Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Module not Installed - Qml issue with included .pro files (iOS)
garryk last edited by
Qml files not refenced in the same pro as the main.qml may cause the runtime error "Module '<module name>’ is not installed", This problem seems to only affect iOS.
My Project structure is something along the lines of:
MyLocalProject\ MyProject.pro qml.qrc qml\ main.cpp main.qml .. CommonProject\ CommonProject.pro commonqml.qrc qml\ QmlObject.qml
qrc qresource prefixes are all “/” so expected import path is the same “qrc:/”
MyProject.pro includes "../CommonProject/CommonProject.pro"
main.qml has a QmlObject
QmlObject.qml has the line "import QtQml.StateMachine 1.0"
This runs fine on Android, MacOs and Windows.
but on iOS this will come up with the runtime error "Module 'QtQml.StateMachine' is not installed"
adding the line "import QtQml.StateMachine 1.0" to main.qml solves this, however this is not an ideal solution as it means when I add a qml file to commonqml.qrc
I need to make sure any Qml modules that are referenced in it are also added to main.qml.