QML Module Not Found QtQuick.Window
-
Trying to make a simple QtQuick project. But running into this error when I Build. Using Qt Creator 6.0.2 Based on Qt 5.15.3 (GCC 11.2.0, 64 bit)
Linux, Ubuntu 22.04.
The error is inmain.qml
which is as follows:import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") }
I have added
/usr/lib/x86_64-linux-gnu/qt6/qml
to theQML_IMPORT_PATH
in the.pro
file.How do I fix this?
-
@MH24 said in QML Module Not Found QtQuick.Window:
QML_IMPORT_PATH
QML_IMPORT_PATH is for your own QML modules, not for /usr/lib/x86_64-linux-gnu/qt6/qml. What is the error message?
-
@MH24 said in QML Module Not Found QtQuick.Window:
: Unknown module(s) in QT:quick
https://stackoverflow.com/questions/39390824/error-unknown-modules-in-qt-qml-quick-qt-creator
install qt5-qtdeclarative-devel -
@MH24 said in QML Module Not Found QtQuick.Window:
: Unknown module(s) in QT:quick
https://stackoverflow.com/questions/39390824/error-unknown-modules-in-qt-qml-quick-qt-creator
install qt5-qtdeclarative-devel -
I am trying the qt6 book and discovered something regarding kits.
Made the Qt Quick UI Project and it created a qmlproject and qml file (with same error as above). When I hovered on the project it said 'No kits are available for this project'. When I went to 'Projects' tab on left it opens 'Configure Project' says 'No suitable kits found' and 'Desktop' under kits is greyed out.
What does this mean?
-
So I created a new kit by manually pointing to Qt 5.15.3 (qt5) instead of Qt 6.2.4. Qt QUick UI Project works fine but others still do not even when I point them to this kit.