Important: Please read the Qt Code of Conduct -

How to use QML_IMPORT_PATH with Qt Cmake Project?

  • I need to provide some modules for project.

    Now, it looks for them in QT directory(I've installed it in $HOME), but instead of it I want to make it search in /usr/lib/x86_64-linux-gnu/qt5/qml/.

    What I have tried:
    a) Defining QML_IMPORT_PATH in .bashrc - didn't work out

    b) Copying needed module in $HOME/Qt5.5.1/Tools/QtCreator/bin/qml/:

    Here we have something different. If I open of the .qml files - it wouldn't underscore import line (which is ok). But, If I run executable with console - the same message module org.bla.bla is not installed.

    So, If copying didn't help, maybe I had to just make QtCreator(or smth else) search for modules in appropriate folder, but how?

  • Ok, it seems I can provide module's path with QML2_IMPORT_PATH. But it doesn't solve my issue since message stays.