Unknown module QQuickWidget
-
Hi,
I'm using QT 5.13.1 and while using QTQuickWidgets imy project is throwing the error
":-1: error: Unknown module(s) in QT: qquickwidget QQuickWidget"
i have updated Qt as well tried with giving the path but still the error is there.
-
@Ashutosh_Sachdeva Do you have
QT += quickwidgets
in your pro file as described here https://doc.qt.io/qt-5/qquickwidget.html ?
-
@Ashutosh_Sachdeva
ok, before we go any further, take a look at this example:
https://doc.qt.io/qt-5/qtquick-quickwidgets-quickwidget-example.htmlIt should be part of your Qt /QtCreator package. See if that compiles.
-
@Ashutosh_Sachdeva said in Unknown module QQuickWidget:
:-1: error: Unknown module(s) in QT: qquickwidget QQuickWidget
quickwidgets No preceding
q
and ans
at the end. You need to get this string exactly right in your .pro file. And removeQQuickWidget
from there, it's not the module name. -
@Ashutosh_Sachdeva said in Unknown module QQuickWidget:
yes i have included that in .pro
But wrongly, as @sierdzio explained...
-
@Ashutosh_Sachdeva Please show your pro file.
And also you have to do complete rebuild after changing pro file: delete build directory, run qmake and build... -
#-------------------------------------------------
Project created by QtCreator 2019-11-07T12:35:48
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Resize
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS +=
mainwindow.hFORMS += mainwindow.ui
QT += qquickwidget
#QT += qml quick#QT += quickwidget
OTHER_FILES += ControlBar.qml
-
@Ashutosh_Sachdeva said in Unknown module QQuickWidget:
QT += qquickwidget
Not
qquickwidget
butquickwidgets
! -
@Ashutosh_Sachdeva
still not what @sierdzio saidalso, you didn't check the example I linked, or you could have simply copy and pasted it from there