
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheParallelAnimation element allows animations to be run in parallel.More...
| Since: | Qt 4.7 |
| Inherits: |
TheSequentialAnimation andParallelAnimation elements allow multiple animations to be run together. Animations defined in aSequentialAnimation are run one after the other, while animations defined in aParallelAnimation are run at the same time.
The following animation runs two number animations in parallel. TheRectangle moves to (50,50) by animating itsx andy properties at the same time.
import QtQuick 1.0Rectangle {id:rectwidth:100;height:100color:"red"ParallelAnimation {running:trueNumberAnimation {target:rect;property:"x";to:50;duration:1000 }NumberAnimation {target:rect;property:"y";to:50;duration:1000 } }}
Like any other animation element, aParallelAnimation can be applied in a number of ways, including transitions, behaviors and property value sources. TheQML Animation and Transitions documentation shows a variety of methods for creating animations.
Note:Once an animation has been grouped into aSequentialAnimation orParallelAnimation, it cannot be individually started and stopped; theSequentialAnimation orParallelAnimation must be started and stopped as a group.
See alsoSequentialAnimation,QML Animation and Transitions, and Animation basics example.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.