GraphTransition QML Type
定义所有动画的容器。更多
Import Statement: | import QtGraphs |
- 所有成员(包括继承成员)的列表
- GraphTransition 是Qt Graphs QML Types for 2D 的一部分。
属性
- TransitionType : enumeration
- animations : list<object>
详细说明
GraphTransition 是 Graphs2D 内部动画的容器。在图形类型中定义该类,可在二维图形中实现XYSeries 的动画变化。要定义单个动画,请将其添加到 GraphTransition 中。同一 GraphTransition 中的单个动画将并行动画化。如果图形在调用添加或替换点的支持函数时发现了 GraphTransition,则会根据添加的动画对值进行内插。
本示例展示了如何在图形中定义 GraphTransition。
import QtGraphs
GraphsView {
LineSeries {
GraphTransition {
GraphPointAnimation {}
}
}
SplineSeries {
GraphTransition {
SplineControlAnimation {}
}
}
}
注意: GraphTransition 需要在需要动画的图形中直接定义。目前仅支持XYSeries 。
另请参见 GraphPointAnimation 和SplineControlAnimation 。
属性文档
TransitionType : enumeration |
过渡类型。
常量 | 说明 |
---|---|
None | 无过渡。 |
PointAdded | 添加了一个点。 |
PointReplaced | 一个点已被替换。 |
PointRemoved | 删除了一个点。 |
animations : list<object> |
GraphTransition 中所有动画的容器。目前只支持添加和清除动画。默认情况下,列表为空。
© 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.