QML中的SequentialAnimation队列动画
来源:互联网 发布:西工大矩阵论课件 编辑:程序博客网 时间:2024/05/21 17:03
组合动画有两种,SequentialAnimation是另一种。它的中文叫队列动画(好吧,我自己翻译的)就是说在它的包含下,所有的动画是一个个按顺序执行的,而不是同时执行。比如之前ParallelAnimation同时执行的那个例子。改变需求:
要求小红方块先向右移动,再向左移动,最后变色。
这个功能还是有很多实现方法,但是当你用队列动画的时候,会很简洁,很方便,而且更加直观。
import QtQuick 2.3import QtQuick.Window 2.2Window { visible: true width: 300 height: 300 MouseArea { anchors.fill: parent onClicked: { test.start() } } Rectangle{ id:rect width: 100 height: 100 color: "red" } SequentialAnimation{ id:test NumberAnimation { target: rect property: "x" duration: 2000 easing.type: Easing.InOutQuad from:0 to:200 } NumberAnimation { target: rect property: "y" duration: 2000 easing.type: Easing.InOutQuad from:0 to:200 } ColorAnimation { target: rect property: "color" duration: 2000 easing.type: Easing.InOutQuad from:"red" to:"blue" } }}动画就不截图了……
0 0
- QML中的SequentialAnimation队列动画
- QML类型说明-SequentialAnimation
- QML中的RotationAnimation旋转动画
- QML中的SmoothedAnimation平滑动画
- SequentialAnimation(顺序动画)和 ParallelAnimation(并行动画)
- QML中的SpringAnimation弹簧震荡动画
- QML动画
- QML图像、状态和动画--QML动画
- QML:动画概念
- QML动画和过度
- QML动画------学习总结
- QML-动画-移动字符串
- qml动画控制器AnimationController
- Qt QML动画概述
- QML动画使用总结
- QML动画与过度
- QML动画 之 PropertyAnimation
- QML动画和过度
- Hibernate Configuration 之连接数据库
- Android反编译(下)
- 解决报错:Session为空(未将对象引用设置到对象的实例)
- 根据字体多少使UILabel自动调节尺寸
- 10 个给 Linux 用户的有用工具
- QML中的SequentialAnimation队列动画
- ASP.Net WebService服务启动不了,显示下面错误
- stm32 外部中断的使用(含实例)
- 给C++初学者的50个忠告
- 怎么查看.ipa的内容
- 解决做Mansonry/Autolayout动画时,uitextfield中的文字会向上抖动或跳动的问题
- 引用
- C# 委托做法
- html5的离线缓存