Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Module not Installed - Qml issue with included .pro files (iOS)
Forum Updated to NodeBB v4.3 + New Features

Module not Installed - Qml issue with included .pro files (iOS)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 240 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    garryk
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved