Running a QML .exe file on Windows
-
Hi,
Using Qt 5.10 on Qt Creator I ran a QML program by the Desktop kit in the Release mode. Then I copied its executable file into a folder and added all .dll files it requested for being run from this address:
C:\Qt\Qt5.10.0\5.10.0\mingw53_32\binNow when I double click the file it makes no action!
What can the problem be please? -
Hi,
Take a look at windeployqt especially the qmldir option for deploying applications for Windows.
-
Take a look at windeployqt especially the qmldir option
It's a executable file in the address:
C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin
When I double click it, it has no reaction just a quick blink.
If there is an appropriate method to make that "my_file" file run properly, please tell me of that. -
It's a command line tool.
-
You have to give the path to where your QML files are in your application sources to the
--qmldir
option. -
As I already wrote: your application sources where the qml files are located.
-
@jsulm Yes,windeployqt can not deploy a executable application,I double click the exe but nothing ever happens.I answer the question on stackoverflow.com where user name is Crawl.W as here.I copy qml floder to runtime directory,and then run the exe, then fell all other unoccupied files heartily.But seemly cannot delete some unoccupied thing in qml\QtQuick, if I delete it double click the exe will have nothing happened.
-
@Crawl.W
Kenchan has mentioded the deploy tool arguments.Windeployqt does'nt know if you are deploying an qml application, so you need to pass
--qmldir [your qml root path folder]
argumentNote: if your qml root path folder has space characters, you should use double quotes between your path or it will interpret as Different Commands.
-
@KillerSmath @kenchan I found my posting linkage of stackoverflow is invalid, I update it just now, Here(https://stackoverflow.com/questions/44762836/deploying-qt-c-qml-application-on-windows/55850012#55850012). My problem seems to need some non-dynamic library(DLL), and runtime is unoccupied. Kind of weird. I had already run my program and then I wanna know that's about what.
-
@Crawl.W
If your apllication is running on test environment, so the windeployqt should able to identify and copy the dependent dlls.
Keep in mind, you also can use --force parameter to copy the dependencies even though they already exist on deploy folder. -
@KillerSmath I have tried
--qmldir [your qml root path folder]
, deployed program is still not work.