Why when running .exe file has 2 windows pop up
-
Hi,
I run the application for desktop, when I run it on Qt IDE, there is no problem, but when I run the .exe file directly (or build with inno to run on another computer), two windows appear, I don't know what is this black window (win1),
While my other apps are normal
Please help everyoneMany thanks !
![alt text]( image url)
![alt text]( image url) -
Looks like you have CONFIG += console in your pro file
-
@Christian-Ehrlicher said in Why when running .exe file has 2 windows pop up:
Looks like you have CONFIG += console in your pro file
Dear Sir,
This is my .pro file, absolutely no CONFIG += console
Thanks !
QT += core gui QT += testlib QT += multimedia multimediawidgets QT += printsupport CONFIG += staticlib CONFIG += qzxing_qml CONFIG += qzxing_multimedia include(QZxing-master/src/QZXing.pri) # copy folder QZxing-master vào thư mục project của bạn RC_ICONS = vst1.ico INCLUDEPATH +=C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/include LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_core410.dll LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_highgui410.dll LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_imgproc410.dll LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_videoio410.dll LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_imgcodecs410.dll LIBS += C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_features2d410.dll LIBS +=C:/SETUP/OPENCV/OpenCV-MinGW-Build-OpenCV-4.1.0/x86/mingw/bin/libopencv_video410.dll greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
-
@DQUY05 said in Why when running .exe file has 2 windows pop up:
QZXing.pri
Maybe in there.
You can remove a config option with
CONFIG -= debug
Add this just before your SOURCES +=
-
Thank Sir !
I don't speak English well, am I doing this right, it still doesn't work
QT += core gui QT += testlib QT += multimedia multimediawidgets QT += printsupport CONFIG += staticlib CONFIG += qzxing_qml CONFIG += qzxing_multimedia CONFIG -= debug include(QZxing-master/src/QZXing.pri)
-
@DQUY05 As I already said maybe CONFG += console is added in QZXing.pri, so removing it before including the pri-file will not help at all...
-
Dear Sir,
Even if I don't use QZXing, the error is still the same
Could it be due to another reason?Thanks !
#CONFIG += staticlib #CONFIG += qzxing_qml #CONFIG += qzxing_multimedia #include(QZxing-master/src/QZXing.pri)