aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-01-12 09:16:38 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-18 16:18:04 +0000
commit17f4cd3024c56364c0296b40c2cfe36fefa19b2c (patch)
treedacaecf44dfa9c70de86610438c0bf593e5bf7c3
parenta9258375d87b20ac7bef07d20225838a0d13e3be (diff)
Doc: Turn notes into section in QQuickWidget overview
The extensive use of notes in overview documentation should be avoided. All the notes are concerned with performance considerations, so let's group them together in one section. Change-Id: I4854e078e35190726091b2ef6b7a674abda8b3b7 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 64f09b80146340d7eac87b51e1c292e69730b21f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc1
-rw-r--r--src/quickwidgets/qquickwidget.cpp19
2 files changed, 13 insertions, 7 deletions
diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
index 674c2ee5e7..ee3a13782c 100644
--- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
@@ -194,6 +194,7 @@ throttling, use the \c basic render loop instead by setting \c
{QSG_RENDER_LOOP=basic} in the environment.
\section2 Threaded Render Loop ('threaded')
+\target threaded_render_loop
On many configurations, the scene graph rendering will happen on a
dedicated render thread. This is done to increase parallelism of
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 37b3823bde..e3b7a8da28 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -558,19 +558,24 @@ QImage QQuickWidgetPrivate::grabFramebuffer()
size of the view. Alternatively the resizeMode may be set to SizeRootObjectToView which
will resize the view to the size of the root object.
- \note QQuickWidget is an alternative to using QQuickView and QWidget::createWindowContainer().
+ \section1 Performance Considerations
+
+ 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.
- \note However, the above mentioned advantages come at the expense of performance.
- Unlike QQuickWindow and QQuickView, QQuickWidget requires rendering into OpenGL
+ However, the above mentioned advantages come at the expense of performance:
+ \list
+
+ \li Unlike QQuickWindow and QQuickView, QQuickWidget requires rendering into OpenGL
framebuffer objects, which needs to be enforced by calling
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi) at startup.
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL) 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
- animations, will not be available.
+ \li Using QQuickWidget disables the \l{threaded_render_loop}{threaded render loop} on all
+ platforms. This means that some of the benefits of threaded rendering, for example
+ \l Animator classes and vsync driven animations, will not be available.
+ \endlist
\note Avoid calling winId() on a QQuickWidget. This function triggers the creation of
a native window, resulting in reduced performance and possibly rendering glitches. The