Windeployqt and QML



  • Hey,
    i've tried to deploy my qml app with windeployqt, but without success.

    I created the release build with Qt Creator. Then i copied the .exe and the folder with my .qml files into another folder to run windeployqt.

    I used:

    windeployqt --qmldir GUI MyApp.exe
    

    After calling, a lot of new folders and files are inserted. But when i want to run the app nothing happens. I get no error message. The app doesn't show. It's strange because i can run the app from Qt Creator without any problems. So i think i don't use the windeployqt tool correctly.

    Can anybody help? Thanks



  • @beecksche

    Hi

    You should use QML installing path instead of GUI.

    for example)

    windeployqt --release --qmldir C:\Qt\Qt5.7.0\5.7\mingw53_32\qml MyApp.exe
    


  • @Devopia53
    Thanks, that was it !


  • Lifetime Qt Champion

    Hi,

    AFAIK, that's the wrong solution. You are basically pulling in all of Qt's QML stuff rather than the one needed for your application.

    You should only need to path the path to the .qml files in your project sources.



  • @SGaist you are right, but:

    In my experience, the windeployqt tool is rather buggy sometimes and does not always add all required .dlls. Just today, we stumbled over this bug: https://bugreports.qt.io/browse/QTBUG-54021

    @beecksche what we usually do is:

    • run the windeployqt tool
    • if the app doesn't start, we manually go over the imports in our app and compare them to the files that windeployqt added
    • we add missing stuff by hand

    note: it is helpful to have all imports in the main qml file of your app, since windeployqt sometimes seems to have troubles resolving imports from qml files in sub folders.



  • @Lorenz
    Today i had the same problem described in the bug.

    I installed an own message handler to get all the messages. There it says that one module is not defined/cannot be found.

    Thanks for the receipt!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.