添加状态间的转换
要使状态之间的移动平滑,可以使用Transitions 为状态之间的变化制作动画。
首先,您需要在States 视图中添加状态,并在Properties 视图中编辑一些可以制作动画的属性,如颜色或数字。例如,您可以将组件位置的变化制作成动画。

在Transitions 中,您可以设置每个属性过渡的起始帧、结束帧和持续时间。还可以为每个动画设置缓和曲线和整个过渡的最长持续时间。
放大过渡效果
在Transitions 中使用工具栏上的滑块设置缩放级别。选择
和
按钮放大或缩小视图。
为状态之间的过渡设置动画
要制作过渡动画,请
- 选择View >Views >Transitions 。

- 选择
(Add Transition) 添加过渡。只有在添加了至少一个状态并修改了其中至少一个属性后,此操作才会生效。
- 移动组件或属性名称旁边的蓝色条,设置属性动画的开始和结束帧。拉动其左右边缘可设置动画的持续时间。
- 要为选定的过渡附加缓和曲线,请选择
(Easing Curve Editor (C)) 按钮。
指定过渡设置
要修改过渡设置,请在Transitions 中选择
(Transition Settings (S)) 。

要添加过渡效果:
- 选择
(Add Transition)。 - 在Transition ID 中,输入过渡的 ID。
- 在From 中,选择要从哪个状态过渡。
- 在To 中,选择要过渡到的状态。
要删除当前过渡,请选择
(Remove Transition) 按钮。
要更改状态组,请从State Group 中选择。
Copyright © The Qt Company Ltd. and other contributors. 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.