Qt Creator sets wrong QML2_IMPORT_PATH in environment.
-
I use Qt Creator 5.0.3 (Based on Qt 5.15.3). I configured the kit and linked qt version (set path to qmake). When I wish to run example QtQuick project (Qt Quick Application - scroll), cmake can build the project but cannot run the result executable.
The problem is that QML2_IMPORT_PATH points to other Qt framework than the one I configured (linked qt version in Options/Kits/QtVersion). It seems it points to the Qt framework that is used by Qt Creator. My project is Qt6; Qt creator is Qt5.
I found in the directory with the qmake (linked qt version in Options/Kits/QtVersion) file qt.conf. When I put copy of qt.conf into the build directory of my qt project then I can run the executable (from terminal or form Qt Creator).
Why Qt Creator corrupts the build environment with wrong QML2_IMPORT_PATH? Why Qt Version is linked wrong? What Qt Creator expects from the qmake executable? Why "linking Qt Version" requires path to qmake executable? Why Qt Creator ignores file qt.conf when I turns out it is important?
I have source code for the Qt6 so if I knew how Qt Creator uses the qmake I could patch it. Could you point me in the right direction?
PS. relevant links