Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt5: QQuickView as child of QWidget?

    QML and Qt Quick
    2
    5
    2605
    Loading More Posts
    • 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
      wspilot last edited by

      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 Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        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 Reply Quote 0
        • W
          wspilot last edited by

          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 Reply Quote 0
          • sierdzio
            sierdzio Moderators last edited by

            [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 Reply Quote 0
            • W
              wspilot last edited by

              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 Reply Quote 0
              • First post
                Last post