Re: [Interest] Windows application runs with console window
I write an application. The common definitions in the project file are: TEMPLATE= app TARGET= application DESTDIR= .. QT += core gui network sql widgets CONFIG+= windows But when I run application I see the console (command prompt) window within my application. Why? I use Qt 5.1.0,MSVC2012, Windows 7. I have found the problem. In my project file there was such lines: debug { DEFINE+=DEBUG QT += testlib } When I've removed that lines command prompt window disappear. I've tried to change that lines to: CONFIG(debug) { DEFINE += DEBUG QT += testlib } But it doesn't help me. What is the problem? Thanks. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Windows application runs with console window
What a coincidence... Exactly today I found this on SO: http://stackoverflow.com/questions/18666799/how-to-prevent-qmake-from-adding-the-console-subsystem-on-the-linker-command-lin#comment27503243_18666799 On Sat, 07 Sep 2013 10:17:03 +0300 Igor Mironchik igor.mironc...@gmail.com wrote: I write an application. The common definitions in the project file are: TEMPLATE= app TARGET= application DESTDIR= .. QT += core gui network sql widgets CONFIG+= windows But when I run application I see the console (command prompt) window within my application. Why? I use Qt 5.1.0,MSVC2012, Windows 7. I have found the problem. In my project file there was such lines: debug { DEFINE+=DEBUG QT += testlib } When I've removed that lines command prompt window disappear. I've tried to change that lines to: CONFIG(debug) { DEFINE += DEBUG QT += testlib } But it doesn't help me. What is the problem? Thanks. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Windows application runs with console window
Hi. You can check this: 1) Are you sure you do not have CONFIG += console somewhere? I'm abolutely sure. There is no CONFIG += console in my project files within my app. 2) Go to the Projects view, look at run settings in your kit. There is a checkbox Run in terminal which activates a console. I'm using Qt Creator 2.6.0, so maybe the GUI has changed and it's not exactly at the same place. I don't use QtCreator for building and running app. I use qmake + jom in console. You can also call FreeConsole() from windows.h in your main function, this removes the console under windows. Normally it's only necessary if you configured the project with CONFIG += console (useful for hybrid console/GUI apps) I will take it in mind. Thanks. By the way. I set icon to my application with QApplication::setWindowIcon and it doesn't work too... ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest