:-1: error: Project ERROR: Unknown module(s) in QT: qml
-
Okay, some details first: Qt 6.2.2, on Fedora 35.
So, obvious question: how can I get hold of the QtQml module (and, to be fair, the rest of the QML modules)? I've tried the Maintenance Tool, and it seems to think they're there already.
-
Can you post the installation tree of your maintenance tool?
-
Hi and welcome to devnet,
Some more details are required:
- type of project: qmake or cmake ?
- how did you create the project ?
-
1: From what I can tell, qmake. (I just pressed the "Build" button, but this pops up when I modify the .pro file, before I try to build it.)
2: Not sure what you mean by this question; I've been using Qt Creator to write my project. -
Can you show the content of your .pro file ?
-
@SGaist, this is what it looks like. You'll note the line causing the error is in Line 1.
QT += core gui network qml greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ qircbot.cpp \ qircbotmainwindow.cpp HEADERS += \ qircbot.h \ qircbotmainwindow.h # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
(As I'm sure you can tell at this point, the project in question is an IRC bot. I am not asking for advice on how to write it; this is a project that is being rebuilt from the ground up, so I've done this before, in this manner before.)
-
@Leway-Previs-0
run clean project, then qmake and rebuild -
@aliks-os I have just done that. On Clean, it brought up that it couldn't find the QML module. Ran QMake, it showed the error in the thread title.
Now, I apologise if I sound like a jerk from this point onwards. As I stated in my original post, it cannot find the files required; it actually seems like they do not exist in my install. (And before anyone asks, yes, I looked.) What I want to know is, where can I find the files required for these modules, and what needs to be located where? That is all I needed to know.
-
How did you install Qt ?
I would have guessed using the online installer in which case you should not be missing these files. -
@Leway-Previs-0 Maybe you also installed Qt packaged by your Linux distribution and are now using that one?
Make sure you use qmake from the Qt installation you want to use.