Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
.exe doesn't start (bis)
Hello every one,
I am having trouble deploying my application. The .exe file generated with Qt Creator doesn't start. I found a similar subject on the forum http://qt-project.org/forums/viewthread/12069 but because it is not solved I am starting a new thread, and also because I don't have the same Qt version.
I am running Qt5.0.0 MSVC2010 with Qt creator 2.6.1, downloaded from the Qt-project download page.
I am developping under Windows 7 32bit.
When I run my app in Qt Creator ("Ctrl+R") I have the following message : "Remove me: fixing toplevel window flags" in the application output. But the application is running correctly.
I found that message in the source file : C:\Qt\Qt5.0.0\5.0.0\Src\qtbase\src\plugins\platforms\windows\qwindowswindow.cpp line 324 (I don't know if it is relevant)
If I try to launch the .exe out of QtCreator nothing happen, double click or command line gave no detail, and no processes appears into the task manager. I also try to launch my app with wine under Ubuntu 12.04 and nothing happens. Of course I put in the same folder all DLLs windows asked.
I will be grateful for any help.
If you want more detail just ask.
master of disaster last edited by
The top level window flags specify the way the window will be displayed, and which buttons should be used.
Try this code before you show/exec your main window:
setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint |
This code should fix the window flags problem.
Thank you for your answer.
I have just added the setWindowFlags(...); line, but it doesn't change anything. I still have the “Remove me: fixing toplevel window flags” message in the application output.
I tryed wether to add the line into the constructor of my main window, or just before the show() into the main.cpp, but both fail.
Something I didn't said concerning my app, that now seems important : I am using the QExtSerialPort library.
So I discovered that the message "Remove me: fixing toplevel window flags" appeared when I call the setUpNotifications() method of the QExtSerialEnumeratorClass. I commented the corresponding line and the message disappear.
I'm now wondering if the QExtSerialPort library is well included in my project. If not I think it can explain why my .exe doesn't start?
I'm not confortable with Library, linking, static build and all that stuff, so I had decided to include the qextserialport.pri file into my project (adding the line : "include(qextserialport/qextserialport.pri)" into my .pro). Maybe it is an error to do like that?
I will try other way to use QExtSerialPort.
In fact I can't run .exe that came from a Qt exemple. So I don't think that QExtSerialPort is responsible of my problem.
I have some improvement but I still have issues:
I added the libEGL.dll with my .exe (but windows doesn't asked it), and now I can double click the .exe and my app starts!
But it only works if Qt5.0.0 is install on the computer. Anny Idea why such a behaviour?
CuteTea last edited by
if you can run your application inside your IDE (such as QtCreator) but not from outside that is a strong indicator that your IDE runs in an environment different from the "outside".
That means in particular, that your IDE environment sets some PATH variables so the the operating systems knows where to look for the DLLs you are using with your app.
You have already found that EGL.dll was missing from your application in the "outside" world. So my guess is that your deployment package lacks some more DLLs, too. Such as all of the Qt DLLs you are using, for example. If you are running on a different operating system (such as a different Windows patch version) you might also be required to deploy the Windows runtime which you have used to compile your application.
I would run the application starting it from a debugger such as the free Visual Studio Express which is more likely to tell which DLLs it is actually trying to load before running into an exception.
Thank you for your answer.
For the moment I re-use Qt4.8.4 for which I have no deployment issues.
I will try your advices as soon as I have some time.