diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-11-15 17:03:01 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-11-17 15:28:57 +0100 |
commit | fa09df7e1ab43a7ca4f81076c518d8530eea711d (patch) | |
tree | 0fd2afa47380a9dac29c3c6126cfffadc78238be /examples/quick | |
parent | c12e55dbd3954a196b0f38b04941296eced75d40 (diff) |
Add doc page for the threadedanimation example
Change-Id: I8907c8532bf7abdc573d2e878374e3f26618f8d9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg | bin | 0 -> 37409 bytes | |||
-rw-r--r-- | examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc | 33 |
2 files changed, 33 insertions, 0 deletions
diff --git a/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg b/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg Binary files differnew file mode 100644 index 0000000000..42c886b7ab --- /dev/null +++ b/examples/quick/scenegraph/threadedanimation/doc/images/threadedanimation-example.jpg diff --git a/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc b/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc new file mode 100644 index 0000000000..d7c76939ae --- /dev/null +++ b/examples/quick/scenegraph/threadedanimation/doc/src/threadedanimation.qdoc @@ -0,0 +1,33 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \example scenegraph/threadedanimation + \title Scene Graph - Threaded Animation + \examplecategory {Graphics & Multimedia} + \ingroup qtquickexamples + \brief Shows benefits of custom items animating independently of the main thread while using the threaded render loop of Qt Quick. + + \image threadedanimation-example.jpg + + This example shows the fundamental concept behind the \l Animator types, by + implementing a custom item that effectively animates itself by not relying + on the standard Qt Quick animation framework driven on the main thread. + + The left and right spinners should behave identically under normal + conditions. However, once the example blocks the main thread by peforming + some heavy operation, it will become noticeable that the left spinner is not + animating smoothly anymore. + + \note This example should be run with the \c threaded render loop of Qt + Quick. This is the default in most cases. There are no positive effects when + using the \c basic render loop, because there everything, including all + rendering, happens on the main thread. + + Applications without custom QQuickItem implementations can get the same + benefits by using one of the \l Animator types, such as \l XAnimator or \l + OpacityAnimator from QML. Whereas when building custom items, similar + results can be achieved by following the example's implementation. + + \sa {Qt Quick Scene Graph} + */ |