AnimationController QML Type
实现对动画的手动控制。更多
| Import Statement: | import QtQuick |
属性
方法
- void completeToBeginning()
- void completeToEnd()
- void reload()
详细说明
通常动画由内部定时器驱动,但 AnimationController 允许通过progress 值明确驱动给定的animation 。
属性文档
animation : Animation [default]
该属性包含由AnimationController 控制的动画。
注:由AnimationController 控制的动画,其running 和paused 属性将始终设为 true。它不能手动启动或停止(就像行为中的动画不能手动启动或停止一样)。
progress : real
此属性用于保存动画进度值。
progress 的有效值为 0.0 至 1.0,设置值小于 0 将转换为 0,设置值大于 1 将转换为 1。
方法文档
void completeToBeginning()
完成受控动画的逆向运行。
调用此方法后,动画将从当前进度点向后正常运行到起始状态。
动画运行时,动画控制器的进度值将自动更新。
另请参阅 completeToEnd() 和progress 。
void completeToEnd()
完成受控动画的正向运行。
调用此方法后,动画将从当前进度点向前正常运行至结束状态。
动画运行时,动画控制器的进度值将自动更新。
另请参阅 completeToBeginning() 和progress 。
void reload()
重新加载动画属性
如果动画属性已更改,则调用此方法重新加载动画定义。
© 2026 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 the GNU 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.