GraphPointAnimation QML Type
表示点的动画类型。更多
Import Statement: | import QtGraphs |
Inherits: |
- 所有成员(包括继承成员)的列表
- GraphPointAnimation 是Qt Graphs QML Types for 2D 的一部分。
属性
- AnimationState : enumeration
- GraphAnimationType : enumeration
- animating : GraphAnimation::AnimationState
详细说明
GraphPointAnimation 是一种从QVariantAnimation 派生的动画类型,它定义了点的动画方式。它可以使用QVariantAnimation 功能和属性来制作动画,如duration
和easing
。这些动画位于QParallelAnimationGroup 中,因此将并行运行。
本示例展示了如何使用 GraphPointAnimation 设置点动画,duration
为 1000ms,easing
为 OutCubic:
import QtGraphs GraphsView { LineSeries { GraphTransition { GraphPointAnimation { duration: 1000; easingCurve.type: Easing.OutCubic } } } }
对于XYSeries 来说,这被认为是系列内定义的主要点列表。点将从起始值到结束值进行线性插值。
注: GraphPointAnimation 目前仅支持在添加或删除点时为系列中的最后一个点制作动画。如果点被替换,无论该点在系列中的索引是多少,都将触发动画。
另请参阅 GraphTransition 和SplineControlAnimation 。
属性文档
AnimationState : enumeration |
动画状态。
常数 | 说明 |
---|---|
Playing | 动画正在播放。 |
Stopped | 动画停止。 |
GraphAnimationType : enumeration |
动画类型。
常量 | 说明 |
---|---|
GraphPoint | GraphPointAnimation 动画。 |
ControlPoint | ControlPointAnimation 动画。 |
animating : GraphAnimation::AnimationState |
保持动画状态。GraphAnimation::AnimationState 中的一个。
© 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.