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. Does QQuickWidget do the same as a QtQuick application?
Forum Updated to NodeBB v4.3 + New Features

Does QQuickWidget do the same as a QtQuick application?

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

    hi!

    i''m developing a simple but fully animated application with qtquick and qml for web assembly, i really dont like to have c++ aside so much... so i was wondering, what happens if i do my application using qt widgets and call all my animated qml stuffs using QQuickWidget ?...

    is there any restriction using QQuickWidget?.. do i have full access to all qtquick fancy controls from there?.. Is there any advantage using qml qtquick application over widgets + QQuickWidget?

    thanks.

    jeremy_kJ 1 Reply Last reply
    0
    • 1 1XU7

      hi!

      i''m developing a simple but fully animated application with qtquick and qml for web assembly, i really dont like to have c++ aside so much... so i was wondering, what happens if i do my application using qt widgets and call all my animated qml stuffs using QQuickWidget ?...

      is there any restriction using QQuickWidget?.. do i have full access to all qtquick fancy controls from there?.. Is there any advantage using qml qtquick application over widgets + QQuickWidget?

      thanks.

      jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      @1XU7 said in Does QQuickWidget do the same as a QtQuick application?:

      i really dont like to have c++ aside so much

      I don't understand if this means that you do or don't want to use C++.

      so i was wondering, what happens if i do my application using qt widgets and call all my animated qml stuffs using QQuickWidget ?...

      is there any restriction using QQuickWidget?.. do i have full access to all qtquick fancy controls from there?..

      Yes, the application has access to everything it would have through a direct instantiation of a QQuickView, QQmlApplicationEngine, or other non-widget interfaces.

      Is there any advantage using qml qtquick application over widgets + QQuickWidget?

      https://doc.qt.io/qt-6/qquickwidget.html#performance-considerations

      However, the above mentioned advantages come at the expense of performance:
      
          Unlike QQuickWindow and QQuickView, QQuickWidget involves at least one additional render pass targeting an offscreen color buffer, typically a 2D texture, followed by drawing a texture quad. This means increased load especially for the fragment processing of the GPU.
      
          Using QQuickWidget disables the threaded render loop on all platforms. This means that some of the benefits of threaded rendering, for example Animator classes and vsync driven animations, will not be available.
      
      

      In addition to the overhead mentioned in the documentation, the application will link with the widgets library. That's a lot of overhead if no additional functionality is used.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 1 Reply Last reply
      1
      • jeremy_kJ jeremy_k

        @1XU7 said in Does QQuickWidget do the same as a QtQuick application?:

        i really dont like to have c++ aside so much

        I don't understand if this means that you do or don't want to use C++.

        so i was wondering, what happens if i do my application using qt widgets and call all my animated qml stuffs using QQuickWidget ?...

        is there any restriction using QQuickWidget?.. do i have full access to all qtquick fancy controls from there?..

        Yes, the application has access to everything it would have through a direct instantiation of a QQuickView, QQmlApplicationEngine, or other non-widget interfaces.

        Is there any advantage using qml qtquick application over widgets + QQuickWidget?

        https://doc.qt.io/qt-6/qquickwidget.html#performance-considerations

        However, the above mentioned advantages come at the expense of performance:
        
            Unlike QQuickWindow and QQuickView, QQuickWidget involves at least one additional render pass targeting an offscreen color buffer, typically a 2D texture, followed by drawing a texture quad. This means increased load especially for the fragment processing of the GPU.
        
            Using QQuickWidget disables the threaded render loop on all platforms. This means that some of the benefits of threaded rendering, for example Animator classes and vsync driven animations, will not be available.
        
        

        In addition to the overhead mentioned in the documentation, the application will link with the widgets library. That's a lot of overhead if no additional functionality is used.

        1 Offline
        1 Offline
        1XU7
        wrote on last edited by
        #3

        @jeremy_k
        yes, my goal is to use c++ as much as possible... that's why i prefer widgets all the time, but if there is a performance cost, i guess i should consider qml for animated applications .

        thanks

        1 Reply Last reply
        0
        • jeremy_kJ Offline
          jeremy_kJ Offline
          jeremy_k
          wrote on last edited by
          #4

          QML doesn't have to be javascript heavy. Treat it the same as a .ui file. Describe the layout and make simple bindings. The rest can be done in C++. Alternatively, have a look at QSkinny.

          Asking a question about code? http://eel.is/iso-c++/testcase/

          1 1 Reply Last reply
          2
          • jeremy_kJ jeremy_k

            QML doesn't have to be javascript heavy. Treat it the same as a .ui file. Describe the layout and make simple bindings. The rest can be done in C++. Alternatively, have a look at QSkinny.

            1 Offline
            1 Offline
            1XU7
            wrote on last edited by
            #5

            @jeremy_k
            That definetively is a good tool.. thanks so much!

            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