module "Qt.labs.platform" is not installed, macdeployqt not copy qt/labs/platform?
Solved
Installation and Deployment
-
Enviroment:
QT 5.14.2, MacOSX 10.15.4 Catalina, build-trytodolist-Desktop_x86_darwin_generic_mach_o_64bit
project.pro:
QT += quick
QT += widgets
CONFIG += c++11I use SystemTrayIcon:
SystemTrayIcon { visible: true icon.source: "media/todo.png" menu: Menu { MenuItem { text: qsTr("Quit") onTriggered: Qt.quit() } } }
Everything ok in QT debug running mode.
And I deploy the dmg:
~/Qt/5.14.2/clang_64/bin/macdeployqt trytodolist.app -qmldir=/Users/username/Qt/5.14.2/clang_64/qml -dmg
the dmg is generated, but when I run the app, I got:
QQmlApplicationEngine failed to load component qrc:/main.qml:4:1: module "Qt.labs.platform" is not installed
I check the path: "build-trytodolist-Desktop_x86_darwin_generic_mach_o_64bit-Debug/trytodolist.app/Contents/Resources/qml/Qt/labs"
not find the "platform" subdirectory, but find "calendar" and "settings".
so, how to fix this? or is it a bug a macdeployqt?
-
Hi and welcome to devnet,
The qmldir option should point to your application's qml files.