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. How to embed QWidget into QML?
Forum Updated to NodeBB v4.3 + New Features

How to embed QWidget into QML?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 3.6k 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.
  • Z Offline
    Z Offline
    zhangXianxiang
    wrote on last edited by zhangXianxiang
    #1

    Now I have a QML form, can I get it's WinId()?
    or embed a QWidget?
    Can Qt quick's rendering mechanism insert QWidget?
    I don't know whether I can or can't.

    OS : Windows10 home 64bit
    Qt Version: 5.10.1
    Halcon Version: 18.05
    Compiler Version: msvc2015 64bit
    Hardware informations:
    CPU: intel-core i7 6700HQ
    GPU: nvdia GTX960M

    Thanks you

    kkoehneK 1 Reply Last reply
    0
    • Z zhangXianxiang

      Now I have a QML form, can I get it's WinId()?
      or embed a QWidget?
      Can Qt quick's rendering mechanism insert QWidget?
      I don't know whether I can or can't.

      OS : Windows10 home 64bit
      Qt Version: 5.10.1
      Halcon Version: 18.05
      Compiler Version: msvc2015 64bit
      Hardware informations:
      CPU: intel-core i7 6700HQ
      GPU: nvdia GTX960M

      Thanks you

      kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      Now I have a QML form, can I get it's WinId()? or embed a QWidget?

      It is only supported it the other way round: Embedding a Qt Quick scene in QWidgets, either through QQuickView, QQuickWidget, or QWidget::createWindowContainer().

      You can then call winId() on the created QWidget (though that has a performance impact; see also https://doc.qt.io/qt-5/qquickwidget.html#details).

      Director R&D, The Qt Company

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

        Hi,

        In addition to what @kkoehne wrote. You might be interested in KDAB's Declarative Widgets project.

        Hope it helps

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

        Z 1 Reply Last reply
        7
        • SGaistS SGaist

          Hi,

          In addition to what @kkoehne wrote. You might be interested in KDAB's Declarative Widgets project.

          Hope it helps

          Z Offline
          Z Offline
          zhangXianxiang
          wrote on last edited by
          #4

          @SGaist OK ,thank you

          1 Reply Last reply
          0
          • kkoehneK kkoehne

            Now I have a QML form, can I get it's WinId()? or embed a QWidget?

            It is only supported it the other way round: Embedding a Qt Quick scene in QWidgets, either through QQuickView, QQuickWidget, or QWidget::createWindowContainer().

            You can then call winId() on the created QWidget (though that has a performance impact; see also https://doc.qt.io/qt-5/qquickwidget.html#details).

            Z Offline
            Z Offline
            zhangXianxiang
            wrote on last edited by
            #5

            @kkoehne I will do further experiments. Thank you very much.^_^

            1 Reply Last reply
            0
            • JoeCFDJ JoeCFD referenced this topic on

            • Login

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