Console appeare in release mode using QT MSVC 2015
-
I am creating an application that uses QWebEngine when I release my application I got a strange problem I have ever seen!! is the console open with my GUI based app! and this project.pro file
#------------------------------------------------- # # Project created by QtCreator 2017-07-31T18:43:56 # #------------------------------------------------- QT += core gui webenginewidgets testlib greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Clicker TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui RESOURCES += \ files.qrc win32:RC_ICONS += a.ico
when the console open it shows some data that shown in the console in debug mode and I guess the problem is from using QWebEngine the console show me this data that come from the website loaded in QWebEngineView the data always start with JS: like this
js: Phaser.Cache.isSoundDecoded: Key "dealer_12" not found in Cache. [5684:3840:0731/214213.208:INFO:CONSOLE(27)] "Phaser.Cache.isSoundDecoded: Key "loose" not found in Cache.", source: example/libs.js (27)
this is some of the data appears in the console so the question is how can I make this console not appear when I start my application? I don't know what makes this problem and don't know what should I search for?
-
I am creating an application that uses QWebEngine when I release my application I got a strange problem I have ever seen!! is the console open with my GUI based app! and this project.pro file
#------------------------------------------------- # # Project created by QtCreator 2017-07-31T18:43:56 # #------------------------------------------------- QT += core gui webenginewidgets testlib greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Clicker TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui RESOURCES += \ files.qrc win32:RC_ICONS += a.ico
when the console open it shows some data that shown in the console in debug mode and I guess the problem is from using QWebEngine the console show me this data that come from the website loaded in QWebEngineView the data always start with JS: like this
js: Phaser.Cache.isSoundDecoded: Key "dealer_12" not found in Cache. [5684:3840:0731/214213.208:INFO:CONSOLE(27)] "Phaser.Cache.isSoundDecoded: Key "loose" not found in Cache.", source: example/libs.js (27)
this is some of the data appears in the console so the question is how can I make this console not appear when I start my application? I don't know what makes this problem and don't know what should I search for?
@AmrCoder It's a javascript info message (warning/error?). It is coming from the web page you are loading with QWebEngine. You can fix the js code if it's something you own, or you can just ignore it if it is something someone else made.
Edit: I read further and noticed it was pulling up a console that you don't want. I don't know how to suppress that but I will check the docs real quick and see if anything jumps out.
Edit again: Here ya go this should help you in preventing the console popping up. http://doc.qt.io/qt-5/qtwebengine-debugging.html#console-logging. It looks pretty easy to deal with. You just catch the messages and deal with them how you like rather than letting the console come up.