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. Qt5: QQuickView as child of QWidget?
QtWS25 Last Chance

Qt5: QQuickView as child of QWidget?

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 2.8k 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.
  • W Offline
    W Offline
    wspilot
    wrote on last edited by
    #1

    Hi,
    I'd like to have a QQuickView (physically) next to a QGLwindow. Both as childs of a Qmainwindow.
    Still, QQuickView does not allow a Qwidget/QMaindow as a parent.
    Is there a workaround for this problem, or is it by default impossible to have both QWidgets and QQuickview?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can use QtDeclarativeView and QML1 to mix with QtWidgets. Integrating QML2 into widgets is being worked upon right now, it will probably go into Qt 5.1 or 5.2.

      (Z(:^

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wspilot
        wrote on last edited by
        #3

        thnks.
        Indeed, I did this already in Qt 4.8, while doing some tests to port an app from QtGui to Qt and QML.
        I don't want to port twice:
        now from qtGui to QML (1.0/Qt4.8) (a lot of work), and afterwards again from Qt4.8/QML1.0 to Qt5.x/QML2.0.
        Unless QML 1.0 will be supported for the coming years and new components are also supplied in QML1.0 (e.g. for Sailfisch devices, upcoming Android/iOS support).

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          [quote author="wspilot" date="1356352467"]Unless QML 1.0 will be supported for the coming years and new components are also supplied in QML1.0 (e.g. for Sailfisch devices, upcoming Android/iOS support).[/quote]

          I don't know. QtQuick1 is definitely going to be supported throughout Qt5 lifetime (so, easily 5-6 years), but to be sure - QML2 will be getting most of the attention. As for other OSes, I don't know what devs intend there, it's up to them to decide.

          Qt 5.1 is planed in spring 2012, these issues should be cleared up by then, either by concrete implementation (as is planned with droid and iOS), or at least in defined plans.

          (Z(:^

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wspilot
            wrote on last edited by
            #5

            Ok. Thanks.
            I think the solution is (and maybe for others with the same issue) to create an interface class that handles the communication between the C++ (classes) and the QML GUI.
            That way at least the C++ is free of version specific hookins, and can remain unchanged when porting to QML2.

            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