Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Unable to include QtQuickWidgets in cmake
Qt 6.11 is out! See what's new in the release blog

Unable to include QtQuickWidgets in cmake

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 928 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yaswanth
    wrote on last edited by Yaswanth
    #1

    Hi,
    I have Qt Widget Application which is running on ubuntu.
    (Qt version : Qt5.12 , OS : Ubuntu 20.04.5 LTS)
    We build application using cmake.
    Now I want to use Qml files in my QtWidgets application.
    To include QtQuickWidgets I tried like below,

    find_package(QT NAMES Qt5 REQUIRED COMPONENTS Widgets Core OpenGL QuickWidgets)
    find_package(Qt5 REQUIRED COMPONENTS Widgets Core OpenGL QuickWidgets)

    target_link_libraries(${app_name}
    Qt5::Core
    Qt5::OpenGL
    Qt5::Widgets
    Qt5::QuickWidgets)

    I am getting error as,
    Could not find a package configuration file provided by "Qt5QuickWidgets"
    with any of the following names:

    Qt5QuickWidgetsConfig.cmake
    qt5quickwidgets-config.cmake
    

    For checking environment, I have created a simple QtWidgets application using QMake and included like below in .pro file
    QT += core gui quickwidgets

    It works and I am able to use qml file in QtWidgets Application.

    Please share your ideas on build error and correct way of including QtQuickWidgets in cmake.

    Thanks in advance.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved