Nominate our 2022 Qt Champions!

Module not installed



  • This post is deleted!

  • Moderators

    @SQEW said in QML module not installed:

    QQmlEngine::addImportPath("/lemonade/bin/org/lemonade/element") as well as a few other things, but I can't get it to work.

    should be QQmlEngine::addImportPath("/lemonade/bin/");



  • @raven-worx

    Told you it was a simple fix! In fact, I tried this path before, but it still didn't work at first, because I used 'import Element 1.0' in my QML files. I've replaced that with 'import org.lemonade.element 1.0', and it works now, thanks!

    Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?


  • Moderators

    @SQEW said in QML module not installed:

    Just one more small question: QtCreator is still unable to recognize this path, as in, the editor underlines it red, and it is unable to use autocompletion as a result. Any idea how to fix that?

    no i don't know - but this doesn't mean there is a way. I also stumbled upon this, and i ended up copying my module to QT_INSTALL_DIR/qml folder.

    QtCreator probably has a setting somewhere to also set it's QML import path.



  • Hello @SQEW,

    I had the same problem on linux and I first used the solution @raven-worx proposed, then I ended up creating a script which

    export QML_IMPORT_PATH=/path/to/your/qml/
    export QML2_IMPORT_PATH=/path/to/your/qml/

    before launching qtcreator


Log in to reply