(Qt5.15.0 + Qt Creator 4.12.4) Qml Module not found - Integrating QML and C++
-
Same problem. Came here to ask it. I'm even using the exact same example which is found here. Original link in the question is a 404.
Qt Creator 4.13.2
Based on Qt 5.15.1 (MSVC 2019, 64 bit)
Built on Oct 1 2020 01:14:56Some more info for my case:
- I get the "QML Module error not found" but not in output, only in the QtCreator text editor. Project still runs and builds fine.
- Ctrl + Space intellisense or whatever its called doesn't recognize the module, and it is shown in gray as in an unrecognized keyword, all while actually working
- I get two warnings. Both are identical:
-1: warning: Failure to find: testcustommodule_metatypes.json
. My project is called TestCustomModule. - While compiling QtCreator adds a subfolder to my Sources which is a full local path and within it is a single file:
testcustommodule_metatypes.json
. I hate this.
Tried importing different QtQuick modules as suggested; no effect. Is there a solution to this yet? Feels like it might have something to do with QML_IMPORT_PATH
For now I'm going back to the old school qmlRegisterType method. But I'd love to get this working.
-
Have exactly the same issue.
Qt Creator 4.13.2
Based on Qt 5.15.1 (MSVC 2019, 64 bit)
Built on Oct 1 2020 01:14:56My application seems to work fine, but Library area with available QML Types in Design tab "dies" everytime I try to edit a QML file with pseudo-erroneous import. It doesn't react to clicks and scrolling.
-
Exactly the same issues described by other posters. I have upgraded Qt Creator to the latest available version (4.13.2), and also updated to 5.15.1 hoping this to solve the problem, but no luck so far. It's disappointing to see how much time has passed since these issues were initially reported with the Qt staff remaining just silent
-
I'm having the same issue as well.
-
Also experiencing the same issue. There is an open bug report here: https://bugreports.qt.io/browse/QTCREATORBUG-24987
-
Hello,
I'm having same issue with Qt6.0.1 and Qt Creator 4.14
But the application still run successfully. Just got this ennoying error (QML module not found) from Qt Creator and also the subfolder with the full path to xxxx_metatypes.json (as described in a post above)Can someone from Qt help on this please ?
Is it a bug on Qt Creator ?Thanks.
-
Also having this problem on 5.15.2, Qt Creator 4.14.0.
I have local classes with the proper
QML_ELEMENT
macro in them, along with the properQML_IMPORT_NAME
andQML_IMPORT_MAJOR_VERSION
defined. The code runs fine with theQML_IMPORT_PATH
set to$$PWD
, but the QML documents are still getting highlighted in QtCreator as not being able to find the module. -
I could resolve this problem.
On the machine where i install the sofware, i download corresponding QT (example : 5.15.2) with QT Creator.
I link the Qml path with the sources :qputenv("QML2_IMPORT_PATH", QString("/home/USER_NAME/Qt/5.15.2/gcc_64/qml").toLatin1());
and it's work.
You can move/export le qml folder to!