Console window with QtQuick app
-
Hello,
When i'm running my gui application i also have a console window oppening, i can see debug messages in it. How to disable that window ?I think once i did CONFIG += console in my .pro file, but right now this line is not there
i tryed CONFIG -= console but still have the window. How to solve this issue please ?Is this window openning because i use qDebug() function in my code ?
.pro
QT += quick testlib QT += opcua QT += network QT += widgets QT += quickcontrols2 CONFIG -= console CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS SOURCES += main.cpp \ machinebackend.cpp \ syslogtest.cpp \ uatest.cpp \ sftpclient.cpp \ sftp_user.cpp \ simplebackend.cpp # test/test_machinebackend.cpp HEADERS += \ machinebackend.h \ syslogtest.h \ uatest.h \ sftpclient.h \ sftp_user.h \ simplebackend.h test{ message(Configuring TEST build...) TEMPLATE = app TARGET = myapptests SOURCES -= main.cpp QT += testlib HEADERS += \ test/test_machinebackend.h SOURCES += \ test/test_machinebackend.cpp } else{ message(Configuring APP build...) TEMPLATE = app TARGET = myapp # CONFIG += plugin # TARGET = $$qtLibraryTarget($$TARGET) }
-
Perhaps you have "Run in terminal" checkbox ticked in Project->Build settings?
-
Hello,
When i'm running my gui application i also have a console window oppening, i can see debug messages in it. How to disable that window ?I think once i did CONFIG += console in my .pro file, but right now this line is not there
i tryed CONFIG -= console but still have the window. How to solve this issue please ?Is this window openning because i use qDebug() function in my code ?
.pro
QT += quick testlib QT += opcua QT += network QT += widgets QT += quickcontrols2 CONFIG -= console CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS SOURCES += main.cpp \ machinebackend.cpp \ syslogtest.cpp \ uatest.cpp \ sftpclient.cpp \ sftp_user.cpp \ simplebackend.cpp # test/test_machinebackend.cpp HEADERS += \ machinebackend.h \ syslogtest.h \ uatest.h \ sftpclient.h \ sftp_user.h \ simplebackend.h test{ message(Configuring TEST build...) TEMPLATE = app TARGET = myapptests SOURCES -= main.cpp QT += testlib HEADERS += \ test/test_machinebackend.h SOURCES += \ test/test_machinebackend.cpp } else{ message(Configuring APP build...) TEMPLATE = app TARGET = myapp # CONFIG += plugin # TARGET = $$qtLibraryTarget($$TARGET) }
@LeLev are you by any chance on macOS? I ran into that too.
Make sure your actually change your QCoreApplication to QApplication and I don't know if it was necessary, but I deleted the build folder and the *.pro.user file
and that fixed it for me.
-
Oh, right, good catch. Thanks for reporting back on this :-)