Does QQuickWidget do the same as a QtQuick application?
-
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.
-
@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.