Unsolved QML2_IMPORT_PATH and "Module is not installed"
-
Qello!
QQmlApplicationEngine engine; engine.addImportPath("qrc:/"); QStringList import_list(engine.importPathList());
Gives me:
- "qrc:/"
- "/Users/danilabagroff/Library/Developer/CoreSimulator/Devices/2951C8C3-../xyz.app"
- "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.