Solved Can't start Qt Quick application
-
Hello,
I would like to make my first QT Quick application. To do so I made a new Qt Quick application project. And from here I've change nothing and tried to run it but it crash at startup.Here is the error I get :
Starting C:\Users\MyProject\debug\MyProject.exe... The program terminated unexpectedly The process was ended forcefully. C:/Users/MyProject/debug/MyProject.exe crashed.
I believe this error is due to a problem with my Qt instalation. I think it is not capable to find Qt Dll. But I don't know how to fix it. Can you please help me to do that ?
Here is my .pro file :
QT += quick CONFIG += c++11 # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked 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 RESOURCES += qml.qrc # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
I haven't change anything from the project generated by Qt it should be good.
-
Hi
You start app from within Creator ?
If you are using a laptop with windows, make sure you updated the gfx drivers
especially if its intel build in gfx.
QML requires ok openGL to run. -
Thank you for your answer,
Yes I do start the App within Creator.
I have updated my Nvidia drivers, I have no GFX drivers and can't find one suitable for my computer on the intel Website, I have an old 3rd Generation i7.
In fact I just found out that it is not only Qt quick application, standard UI Application crashes also... -
@DavidM29
Hi
Do you mean that a normal Qt GUI app also crashes when run from Creator ?
There might be some DLL conflict then. -
Yes, I just tried a previous GUI App and it crashes. I believe there is something wrong with my DLL. How can I check that ?
-
Hi
So if you create a default empty GUI app, it can crash ?
( an older project , unless really clean, is not optimal)Anyway, some of the reason for such things.
1: During install, the anti virus fuxed it up silently.
cure is to reinstall with it off
2: some other Qt are are installed on system and added its path to global path.
3: Font issues. at least in win 7 , it could make it crash with a a bad font.
4: Something is up with Creator and it dont setup paths correctly when it runs.Did you install Qt recently or did you have a big windows update ?
-
I just tried with a new GUI App and here is the result :
I reinstalled Qt recently. I had an old version on my windows (I was using virtual machine with linux). And since I reinstalled it, it does not work anymore.
Your second reason could be the reason why I have problem considering my old Qt kept its path and my new one added some.
How can I make sure of that ? -
Hi
if you start
C:\Qt\MaintenanceTool.exeDoes it list more than one Qt installed ?
Normally its NOT an issue (Creator can use many version of Qt) but
odd crashes like this normally/often comes from wrong DLLs being loaded.if you have other version of Qt on hd. Could you rename that folder for test if 5.11 than runs?
-
I started it, then I tried to make update modules and Add or remove module but it tells me that I have no valid and active repository, at least one is required. So I suppose I have something real wrong. I try to remove everything I have around Qt and make a clean install.
-
Nah, it might not be something you did :)
But if an options, please remove all and use the online installer to install
one or more Qt versions.I think its the fastest way to make it run :)
-
I had issues using the online installer, I was stuck at 5% that is why I used Offline installer. So I uninstalled everything, and found an older version of that online installer and now everything seems good. Exept that I don't have the 5.11 but only 5.10 version of Qt don't know why it was not available on that installer. Is there a way to update Qt without downloading the entire package ?
-
@DavidM29
well maintenance tool can update. :)