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. Qt Widgets in QML
Forum Update on Monday, May 27th 2025

Qt Widgets in QML

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 2.2k Views
  • 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.
  • M Offline
    M Offline
    maxy
    wrote on 29 Apr 2014, 04:20 last edited by
    #1

    How to load Qt widgets in QML using Qt Quick 2.0.

    My Qt version is 5.2.1 and Qt Quick 2.0.

    Thanks in Advance

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 29 Apr 2014, 04:55 last edited by
      #2

      Hi,

      What do you mean by "load"?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • E Offline
        E Offline
        econtech
        wrote on 29 Apr 2014, 05:01 last edited by
        #3

        Hi,

        I want to display Qt widget in QML file using Qt Quick 2.0.

        Thanks

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JKSH
          Moderators
          wrote on 29 Apr 2014, 05:24 last edited by
          #4

          [quote author="econtech" date="1398747679"]I want to display Qt widget in QML file using Qt Quick 2.0.[/quote]That is not possible, unfortunately. You can put a Qt Quick item inside a widget, but you cannot put a widget inside a Qt Quick item.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxy
            wrote on 29 Apr 2014, 05:25 last edited by
            #5

            Hi,

            I want to display Qt Widget in Qml file using Quick 2.0.
            In QtQuick 1.0 there is option QDeclaraticeView is used to load the Widget.

            But I want to display Qt widget in QMl file using QtQuick 2.0. Also I wnat to adjust the size of the widget in Qml file.

            Can you help me.

            Thanks

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JKSH
              Moderators
              wrote on 29 Apr 2014, 06:11 last edited by
              #6

              Oh, I see.

              In Qt Quick 2, QDeclarativeView is now called "QQuickView ":http://qt-project.org/doc/qt-5/qquickview.html

              Use the QQuickView to show your QML file. Then, call QWidget::createWindowContainer() to put the QQuickView inside other widgets. (See https://blog.qt.digia.com/blog/2013/02/19/introducing-qwidgetcreatewindowcontainer/ for an example).

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0

              2/6

              29 Apr 2014, 04:55

              topic:navigator.unread, 4
              • Login

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