summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-10 08:14:33 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-11 13:25:50 +0000
commit80bc943025398d0cdb29e4edbe096d8ac127263e (patch)
tree526fd7a5ba905ef5c3566c5e30c57fcfbe3489eb
parent9a9c13a4a36707db704412812780015b8d839766 (diff)
QQuickWidget/Documentation: Mention the need to set the graphics API
Pick-to: 6.0 Change-Id: I3b60586604003e360070a0d481e1a3df2e087e5c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-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 6951dccf62..c94c70f579 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -483,9 +483,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