Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to embed a QWidget in Qt Quick
Forum Updated to NodeBB v4.3 + New Features

How to embed a QWidget in Qt Quick

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 370 Views 3 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.
  • S Offline
    S Offline
    StingKo
    wrote on last edited by
    #1

    As a Qt Quick beginner, I am migrating a QWidget project to Qt Quick. Currently, I have found that the TreeView in Quick does not meet my business needs, so I would like to continue using QWidget for this part. However, I’m not sure how to embed a QWidget component in Qt Quick (maybe I missed something in the documentation, but I hope to get some guidance). thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ankou29666
      wrote on last edited by ankou29666
      #2

      You can integrate QtQuick inside QtWidget with QQuickWidget, however, I seriously doubt the contrary to be possible. Unless instanciating from Main.cpp one window for QtQuick and another for QtWidgets, which is not really a super idea.

      Edit : as a matter of fact you actually could put your QtQuick work into a QQuickWidget (in that case the top most element from the QML should be an Item or derivate, but not a Window), but that would be the Quick work either inside or next to the Widget, while you seem to be searching for the contrary.

      What's wrong with QML's TreeView ? It's normally supposed to offer the same functionalities than it's widget counter part.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        If you really really need that, you can check the (now archived) Declarative Widgets project.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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