Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Correct usage of QML_DESIGNER_IMPORT_PATH and QML_IMPORT_PATH



  • Hi, we have a QmlPlugin that ships as .so file togehter with .qml files. When building and running the projects, everything is fine. Now we want to add support for the Designer Mode in Qt Creator. Following https://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html, everything is fine, Designer can find the qml files and load the shared libraries. Since our .qml components require some C++ backend, we want to mock them now. As far as I understood, QML_DESIGNER_IMPORT_PATH should help here as it should allow us to replace the original .qml file with an alternative implementation for the designer?! We set the QML_DESIGNER_IMPORT_PATH path to point to the desinger directory in our QmlPlugin but nothing happens.
    Is QML_DESIGNER_IMPORT_PATH actually meant to replace a production .qml with a design mode specific?

    Thx!