Results 1 to 4 of 4

Thread: QQuickWidget not found when integrating QML in QWidget application

  1. #1
    Join Date
    Sep 2015
    Posts
    15
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default QQuickWidget not found when integrating QML in QWidget application

    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?

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QQuickWidget not found when integrating QML in QWidget application

    Add the quickwidgets module in the .pro file:
    Qt Code:
    1. QT += quickwidgets
    To copy to clipboard, switch view to plain text mode 
    And don't forget to run qmake after you modify the .pro file.

  3. #3
    Join Date
    Sep 2015
    Posts
    15
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QQuickWidget not found when integrating QML in QWidget application

    That works, thanks a lot!

  4. #4
    Join Date
    Jul 2021
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QQuickWidget not found when integrating QML in QWidget application

    Any Idea how/what to do when one gets the same error while using CMake?

Similar Threads

  1. QQuickView or QQmlApplicationEngine or QQuickWidget
    By ustulation in forum Qt Quick
    Replies: 0
    Last Post: 18th January 2015, 14:16
  2. Replies: 2
    Last Post: 18th December 2013, 10:19
  3. Integrating Analytics using QT in desktop application
    By Nitin Rastogi in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2012, 22:35
  4. Integrating X window application in QT Widgets
    By augusbas in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2010, 08:52
  5. Replies: 2
    Last Post: 27th June 2007, 11:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.