aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-10 08:14:33 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-11 14:58:56 +0000
commit90d3d42d1be64556bb417d0dda6f3a37342c6767 (patch)
treef4585f71596c9fa08f2fcc1187f87392b5b51d21 /src
parentc48ba63c9001a6965f3ea7e0ddbceacf994f777e (diff)
QQuickWidget/Documentation: Mention the need to set the graphics API
Change-Id: I3b60586604003e360070a0d481e1a3df2e087e5c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 80bc943025398d0cdb29e4edbe096d8ac127263e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quickwidgets/qquickwidget.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 38b5addc07..08d6b6224c 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -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