Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QML2_IMPORT_PATH and "Module is not installed"
danilabagroff last edited by
QQmlApplicationEngine engine; engine.addImportPath("qrc:/"); QStringList import_list(engine.importPathList());
...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
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.