I have a Qt GUI application running on Windows that allows command-line options to be passed and under some circumstances I want to output a message to the console and then
Oh you can Output a message when using QT += gui and CONFIG += console.
QT += gui
CONFIG += console
You need printf("foo bar") but cout << "foo bar" doesn't works
printf("foo bar")
cout << "foo bar"