View Full Version : QQuickWidget not found when integrating QML in QWidget application

yi gi
23rd September 2015, 16:47
Hi all,

I'm trying to build a multi-page application with inputs of custom design (radio button, checkboxes, sliders, etc.).
I'm currently trying to integrate a simple slider using the designer by adding a QQuickWidget to the application.
Everything worked before and the designer seemed to function properly until I try to build and run the application upon which I get the following messages:
"The file ui_mainwindow.h has changed outside Qt Creator. Do you want to reload it?"
and after choosing yes:
"[..]\ui_mainwindow.h:30: error: C1083: Cannot open include file: 'QQuickWidget': No such file or directory"

I've tried to manually include the relevant library in the main.cpp file instead of the ui header.
I've also added the "include" folder in the path.

Any ideas what I might try next?

23rd September 2015, 19:54
Add the quickwidgets module in the .pro file:

QT += quickwidgets

And don't forget to run qmake after you modify the .pro file.

yi gi
24th September 2015, 07:41
That works, thanks a lot!