[Solved] Deployment problem of Qt Quick application on Mac OS X 10.10.1, Qt 5.3.2



  • I cannot deploy a Qt Quick application on Mac OS X 10.10.1, Qt 5.3.2.

    I run

    @macdeployqt applicationName.app@

    but when I run the final app, I get (using terminal) the following error:

    @QQmlApplicationEngine failed to load component
    qrc:/main.qml:2 module "QtQuick.Controls" is not installed
    qrc:/main.qml:1 module "QtQuick" is not installed
    qrc:/main.qml:2 module "QtQuick.Controls" is not installed
    qrc:/main.qml:1 module "QtQuick" is not installed@



  • Hi Stavros Filippidis,

    For Qt Quick you must use this format of command:
    @
    macdeployqt <application_bundle> -qmldir=<path_to_root_folder_of application_qml_files> -execute=<application_bundle>/Contents/MacOS/<app_name>
    @

    where:

    • qmldir - this argument need to macdeployqt for analyse your mL files and find all plugins which you used in your app. All plugins will be copy to your app bundle.
    • execute - I use scrip so I'm not sure about this argument.

    For mo information you could fine in "this topic":http://qt-project.org/forums/viewthread/48391/.



  • [quote author="shav" date="1416474756"]Hi Stavros Filippidis,

    For Qt Quick you must use this format of command:
    @
    macdeployqt <application_bundle> -qmldir=<path_to_root_folder_of application_qml_files> -execute=<application_bundle>/Contents/MacOS/<app_name>
    @

    where:

    • qmldir - this argument need to macdeployqt for analyse your mL files and find all plugins which you used in your app. All plugins will be copy to your app bundle.
    • execute - I use scrip so I'm not sure about this argument.

    For mo information you could fine in "this topic":http://qt-project.org/forums/viewthread/48391/.[/quote]

    Thanks! Actually, only the -qml parameter was enough!

    @macdeployqt <application_bundle> -qmldir=<path_to_root_folder_of_application_qml_files>@

    It gives a number of warnings such as

    @File exists, skip copy: "/Users/<username>/build-<app_name>-Desktop_Qt_5_3_0_clang_64bit-Release/<app_name>.app/Contents/Resources/qml/QtQuick/Layouts/qmldir"@

    but, other than that, it works!

    I had previously tried the -qml parameter, but it was using a relative path such as

    @~/<qml_folder>@

    and it didn't work! This time I used an absolute path such as

    @/Users/<username>/<qml_folder>@

    and it worked just fine!


Log in to reply
 

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