[Interest] Custom QtQuick Animator API?
gunnar at sletta.org
Sun Jan 25 16:42:49 CET 2015
> On 22 Jan 2015, at 15:37, Ola Røer Thorsen <ola at silentwings.no> wrote:
> Hi all,
> I would like to create a custom Animator class, or something similar that can manipulate a QQuickItem's x and y position from the render thread.
You cannot manipulate an item’s x and y from the render thread. You can only operate on the scene graph nodes.
> The intended use is to move some label items on top of a 3d scene. The labels will follow certain entities in the 3d scene. I know it will mostly work by just setting the label item's x and y properties, but it will not be as smooth as possible.
> I've been looking into the Animator source code, which is all private API. Are there any plans to make a public API for the Animators in a later Qt version?
No such plan, no :)
Doing custom animations on your nodes is easy using the QSGNode API though. For instance, like it is done in the “threadedanimation” example: https://qt.gitorious.org/qt/qtdeclarative/source/817cd03a5f437c9e8862646cca5ea016b1223bc7:examples/quick/scenegraph/threadedanimation <https://qt.gitorious.org/qt/qtdeclarative/source/817cd03a5f437c9e8862646cca5ea016b1223bc7:examples/quick/scenegraph/threadedanimation>
> Alternatively, is there some way to get the root item node as returned by QQuickItemPrivate::itemNode(), without using the private API? Any other hints on how to do this?
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest