GraphTransition QML Type
用于定义所有动画的容器。更多...
| Import Statement: | import QtGraphs |
- 所有成员的列表,包括继承的成员
- GraphTransition 是Qt Graphs 2D QML 类型的一部分。
属性
- TransitionType : enumeration
- animations : list<object>
详细说明
GraphTransition 是 Graphs2D 中用于存储动画的容器。在图类型中定义此类,即可在 2D 图中为 `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 中所有动画的容器。目前仅支持添加和清除动画。默认情况下,该列表为空。
© 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.