|author||Friedemann Kleint <Friedemann.Kleint@qt.io>||2021-02-10 08:14:33 +0100|
|committer||Qt Cherry-pick Bot <email@example.com>||2021-02-11 14:58:56 +0000|
QQuickWidget/Documentation: Mention the need to set the graphics API
Change-Id: I3b60586604003e360070a0d481e1a3df2e087e5c Reviewed-by: Laszlo Agocs <firstname.lastname@example.org> (cherry picked from commit 80bc943025398d0cdb29e4edbe096d8ac127263e) Reviewed-by: Qt Cherry-pick Bot <email@example.com>
1 files changed, 7 insertions, 3 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 38b5addc07..08d6b6224c 100644
@@ -481,9 +481,13 @@ QImage QQuickWidgetPrivate::grabFramebuffer()
\note QQuickWidget is an alternative to using QQuickView and QWidget::createWindowContainer().
The restrictions on stacking order do not apply, making QQuickWidget the more flexible
- alternative, behaving more like an ordinary widget. This comes at the expense of
- performance. Unlike QQuickWindow and QQuickView, QQuickWidget involves rendering into OpenGL
- framebuffer objects. This will naturally carry a minor performance hit.
+ alternative, behaving more like an ordinary widget.
+ \note However, the above mentioned advantages come at the expense of performance.
+ Unlike QQuickWindow and QQuickView, QQuickWidget requires rendering into OpenGL
+ framebuffer objects, which needs to be enforced by calling
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi) at startup.
+ This will naturally carry a minor performance hit.
\note Using QQuickWidget disables the threaded render loop on all platforms. This means that
some of the benefits of threaded rendering, for example \l Animator classes and vsync driven