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. QML2_IMPORT_PATH and "Module is not installed"

QML2_IMPORT_PATH and "Module is not installed"

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 801 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.
  • D Offline
    D Offline
    danilabagroff
    wrote on last edited by
    #1

    Qello!

    	QQmlApplicationEngine engine;
    	engine.addImportPath("qrc:/");
    	QStringList import_list(engine.importPathList());
    

    Gives me:

    1. "qrc:/"
    2. "/Users/danilabagroff/Library/Developer/CoreSimulator/Devices/2951C8C3-../xyz.app"
    3. "qrc:/qt-project.org/imports"

    ...and this is what I expect and everything works like a charm.

    But I have just 2 in the list(second and third) if I try to set QML2_IMPORT_PATH(and QML_IMPORT_PATH, QML_DESIGNER_IMPORT_PATH as well) in .pro or in "Build Environment" within QtCreator.

    My attempts are:
    QML2_IMPORT_PATH += $$PWD
    or
    QML2_IMPORT_PATH += qrc:/

    As a result, I'm getting "Module ... is not installed."
    Worth to mention, that I do not see anything in the log with QML_IMPORT_TRACE=1. This makes me completely confused, are variables taken into account?

    It is not a critical issue, but I'm using QQmlEngine across the code and would like to have import path in the one place.
    Thank you for the ideas.

    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