Qt Quick Timeline 概述

时间线可用于将项目制成动画并定义其行为。在特定时间点,只能有一条时间线处于活动状态。

为项目属性设置动画可使其值在中间值之间移动,而不是立即变为目标值。例如,要移动场景中的一个项目,可以将控制项目位置的属性 x 和 y 动画化,使项目的位置在到达目标位置的关键帧上发生变化。同样,你还可以在关键帧中改变项目的颜色和缩放属性,使其看起来移动得更近或更远。

Qt Design Studio 包含一个时间轴编辑器,用于创建基于关键帧的动画。

Qt Quick 您可以在 对象中声明各种用户界面状态。这些状态由基本状态的属性变化组成,是组织用户界面逻辑的有用方法。过渡是可以与项目关联的对象,用于定义项目属性因状态改变而发生变化时的动画效果。您可以在 中将时间轴动画与状态绑定。State Qt Design Studio

© 2025 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.