[Interest] Custom QtQuick Animator API?
Ola Røer Thorsen
ola at silentwings.no
Mon Jan 26 10:04:18 CET 2015
Hi Gunnar, thanks for the reply.
2015-01-25 16:42 GMT+01:00 Gunnar Sletta <gunnar at sletta.org>:
>
>
> 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
>
>
I use the QSGNode API already. But this only works for nodes I instantiate
myself, right?
I'm looking for a way to manipulate a transform node so that any child item
instantiated in QML will be affected.
MyAnimatedNode {
Text {
...
}
Image {
...
}
}
If MyAnimatedNode was a spinner like in the "threadedanimation" example,
the text and image would not spin along.
I did find a way though, but it does abuse the API. I can use
QSGNode::parent to find the parent transform node (the "itemNode"?) of a
dummy node I create. I can then manipulate the itemNode's transform similar
to what the animator classes do. Not that I'll ship anything actually doing
that.
Cheers,
Ola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150126/c9bc3794/attachment.html>
More information about the Interest
mailing list