本页内容

GraphPointAnimation QML Type

一种表示点动画的动画类型。更多...

Import Statement: import QtGraphs
Inherits:

XYSeriesAnimation

属性

详细说明

GraphPointAnimation 是从 `QVariantAnimation ` 派生的一种动画类型,用于定义点如何进行动画效果。它可以在动画中使用 `QVariantAnimation ` 的功能和属性,例如 `duration ` 和 `easing`。这些动画被封装在 `QParallelAnimationGroup ` 中,因此将并行运行。

本示例演示了如何使用 GraphPointAnimation 设置点进行动画效果,其中duration 为 1000 毫秒,easing 为 OutCubic:

import QtGraphs

GraphsView {
    LineSeries {
        GraphTransition {
            GraphPointAnimation { duration: 1000; easingCurve.type: Easing.OutCubic  }
        }
    }
}

对于XYSeries ,这被视为系列中定义的点的主列表。该点会从起始值线性插值到结束值。

注意:GraphPointAnimation 目前仅支持在系列中添加或移除数据点时对系列中的最后一个数据点进行动画处理。如果数据点被替换,无论该数据点在系列中的索引位置如何,都会触发动画。

另请参阅 GraphTransition 和SplineControlAnimation 。

属性文档

AnimationState : enumeration

动画状态。

常量描述
Playing动画正在播放。
Stopped动画已停止。

GraphAnimationType : enumeration

动画类型。

常量描述
GraphPointGraphPointAnimation 动画。
ControlPoint一个 ControlPointAnimation 动画。

animating : GraphAnimation::AnimationState

保存动画状态。属于GraphAnimation::AnimationState 之一。

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