Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Strange problem with macdeployqt tool on Qt 5.7 Beta



  • Re: [SOLVED] macdeployqt problem

    Hi everyone!

    I have a strange problem after use command macdeployqt on my mac. I have a project with custom UI elements where I using Qt.labs.controls. If I build and run application without macdeployqt all works fine but if I run macdeployqt tool to my app bundle the application is broken and can't lunch. There is error message:

    $ NestleanClient/NestleanClient.app/Contents/MacOS/NestleanClient 
    argc:  1  argv:  0x7fff58319a90
    DESKTOP
    QQmlApplicationEngine failed to load component
    qrc:/qml/main.qml:326 Type ApplicationDetailView unavailable
    qrc:/qml/Applications/ApplicationDetailView.qml:142 Type ApplicationTestsResultsView unavailable
    qrc:/qml/Applications/ApplicationTestsResultsView.qml:255 Type CreateTestcaseView unavailable
    qrc:/qml/Applications/Testcases/CreateTestcaseView.qml:320 Type CustomComboBox unavailable
    qrc:/qml/Components/CustomComboBox.qml:3 module "Qt.labs.controls" plugin "qtquickcontrolsplugin" not found
    
    Segmentation fault: 11
    

    As you can see application can't find module in qtquickcontrolsplugin. The command how I call macdeployqt tool:

    /Volumes/HPDD/Applications/Qt/Qt5.x/5.7/clang_64/bin/macdeployqt <full_path_to_app>/NestleanClient.app -qmldir=<full_path_to_qml_files_folder>/NestleanClient -verbose=2
    

    The full log you can find here.

    What I can do to fix this problem? Thanks for the any help.

    Qt version: 5.7.0 beta 1 (official beta release from DMG).



  • @shav I found that with macdepoyqt, I have to change the directory to $QTDIR/bin before running it.



  • Hi,

    Thanks for the reply.
    Are you trying from Qt Creator or console? Could you share to me your command format?



  • @shav Command-line. Simple: cd $QTDIR/bin && macdeployqt ... /full/path/to/Application.app



  • @cheezus Thanks! I will test it.



  • Hi everyone!

    I've test the command and all works fine if I commented module "Qt.labs.controls 1.0". But if I use this model I receive error every time when I try to use macdeplotqt tool.

    QmlApplicationEngine failed to load component
    qrc:/qml/main.qml:340 Type ApplicationDetailView unavailable
    qrc:/qml/Applications/ApplicationDetailView.qml:140 Type ApplicationTestsResultsView unavailable
    qrc:/qml/Applications/ApplicationTestsResultsView.qml:243 Type CreateTestcaseView unavailable
    qrc:/qml/Applications/Testcases/CreateTestcaseView.qml:302 Type CustomComboBox unavailable
    qrc:/qml/Components/CustomComboBox.qml:3 module "Qt.labs.controls" plugin "qtquickcontrolsplugin" not found
    

    I think the problem with plugin. I'll wait RC version of Qt 5.7 maybe this bug will be fixed.