0

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?
Update
this a screenshot of my project setting here
and this a screenshot from my app when I open it after I release the application and copy all DLL files to the folder directory here

user7179690
  • 1,051
  • 3
  • 17
  • 40
  • How do you build your application? – vahancho Aug 01 '17 at 06:31
  • I agree with @vahancho. Please show us the project settings (a screenshot will do) and which profile (default, debug, release, release minimal size or release with debug info) you are using. – rbaleksandar Aug 01 '17 at 07:01
  • 1
    This question looks similar: https://stackoverflow.com/questions/760323/why-does-my-qt4-5-app-open-a-console-window-under-windows . You can try to apply solutions described there. – vahancho Aug 01 '17 at 07:15
  • I update the question. yes thank I am checking the link now i hope i solve it – user7179690 Aug 01 '17 at 07:17
  • solved Thank you vahancho the problem is that I use QTest library which makes console appear by default I use QT.testlib.CONFIG -= console in .pro file and it works fine – user7179690 Aug 01 '17 at 07:24

1 Answers1

0

Thanks to Vahancho who give me the link of a similar question
to solve this problem on windows I add this to my Qt project in .pro file

QT.testlib.CONFIG -= console

and it works the reason is when I use QTest library in Qt it shows the console by default
so the problem is not from using QtWebEngine as I expected

user7179690
  • 1,051
  • 3
  • 17
  • 40