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 20 Jul 2018, 08:40 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

    K 1 Reply Last reply 20 Jul 2018, 10:07
    0
    • Z zhangXianxiang
      20 Jul 2018, 08:40

      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

      K Offline
      K Offline
      kkoehne
      Moderators
      wrote on 20 Jul 2018, 10:07 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 23 Jul 2018, 03:00
      3
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 20 Jul 2018, 10:16 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 23 Jul 2018, 00:57
        7
        • S SGaist
          20 Jul 2018, 10:16

          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 23 Jul 2018, 00:57 last edited by
          #4

          @SGaist OK ,thank you

          1 Reply Last reply
          0
          • K kkoehne
            20 Jul 2018, 10:07

            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 23 Jul 2018, 03:00 last edited by
            #5

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

            1 Reply Last reply
            0
            • J JoeCFD referenced this topic on 8 Aug 2023, 18:16

            2/5

            20 Jul 2018, 10:07

            • Login

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