Windows really does not support dual-mode applications.
To see the console output, you need to create a console application
CONFIG += console
However, if you double-click on the program to launch the GUI mode version, you will get a console window, which is probably not what you want. To prevent the console window from appearing, you need to create a GUI mode application, in which case you will not get an output in the console.
One idea might be to create a second small application, which is a console application and provides output. This may cause a second job.
Or you could put all the functions in a DLL, and then create two versions of the .exe file that have very simple core functions that are called in the DLL. One for the GUI and one for the console.
David Dibben Jul 30 '10 at 8:59 2010-07-30 08:59
source share