Deploy Qt5 QML application

前端 未结 5 1608
广开言路
广开言路 2020-12-03 11:49

To test QML deployment I\'ve created a very simple QML application. Here is the code:

main.cpp

#include 

        
5条回答
  •  再見小時候
    2020-12-03 12:15

    As mentioned by BaCaRoZzo, a general solution that worked pretty well for me is to follow this guide.

    To sum it up, copy in an empty directory:

    • The release version of MyApp.exe, along with .dll you created for this projet
    • All the .dll files from \mingw48_32\bin\
    • All the folders from \mingw48_32\plugins\
    • (If you used QML) All the folders from \mingw48_32\qml\

    First, during the test of your application, rename your qt folder so it is not found by $PATH, and double-click on MyApp.exe. This should run the program.

    NB: It leads to a very big application, so you will need to delete some extra files and folders. The easiest way is for the dll: you run the program, and while being run, you delete all the dll in your new project. Only the ones that are not used by MyApp.exe will be deleted. Efficient!
    For the Qt folders, proceed by trials and errors.

提交回复
热议问题