Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QML included modules "not installed" unless qml directory is a subdirectory of the project file
Forum Update on Monday, May 27th 2025

QML included modules "not installed" unless qml directory is a subdirectory of the project file

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    mlittlejohn
    wrote on last edited by
    #1

    I have a project with a structure like
    app/source/

    • all source and headers

    app/resource/

    • main.qrc
    • qml/main.qml

    app/project/

    • app.pro

    With the app structured this way I am able to build but I get a blank white screen at runtime with errors about modules not being installed:
    W/Qt (28056): qrc:/qml/main.qml:47 ((null)): qrc:/qml/main.qml:47:1: module "QtPositioning" is not installed
    W/Qt (28056): qrc:/qml/main.qml:46 ((null)): qrc:/qml/main.qml:46:1: module "QtQuick.Layouts" is not installed
    W/Qt (28056): qrc:/qml/main.qml:43 ((null)): qrc:/qml/main.qml:43:1: module "QtQuick.Controls" is not installed
    W/Qt (28056): qrc:/qml/main.qml:42 ((null)): qrc:/qml/main.qml:42:1: module "QtQuick" is not installed

    If I move the resource directory to being a subdirectory of the project file it works:
    app/source/

    • all source and headers

    app/project/

    • app.pro
    • main.qrc
    • qml/main.qml

    However, I wish to retain a separate directory for the resources. I've searched for flags to put in the project file to force it to find the modules but nothing seems to work. Any ideas how to accomplish this?

    Edit: Forgot to mention potentially relevant information. This is using Qt 5.4 for android target armeabi-v7a. Built and deployed using Qt Creator.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheLivingOne
      wrote on last edited by
      #2

      You need to set QML_ROOT_PATH in your .pro file to the path to the directory with your QML files. The default value is your project directory, that's why it works when you put your qml's right there.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlittlejohn
        wrote on last edited by
        #3

        [quote author="TheLivingOne" date="1421820531"]You need to set QML_ROOT_PATH in your .pro file to the path to the directory with your QML files. The default value is your project directory, that's why it works when you put your qml's right there.[/quote]

        This did the trick, thank you!

        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