If I open my application an empty console window appears, since I added CONFIG += console
to my .pro
file. I need the console, because I've implemented a CLI, where some stuff needs to get printed out on the console. On Linux and Mac OSX, I don't actually need the CONFIG += console
there. It just works.
How can I prevent opening a windows console, if the .exe
gets executed normally over a double click, but display some outputs if my .exe
gets started via a console window?
Basically, I use qDebug() << "myText";
and then after that I exit the application with return 0;
.