本页内容

SplineControlAnimation QML Type

一种表示样条控制点动画的动画类型。更多...

Import Statement: import QtGraphs
Inherits:

XYSeriesAnimation

属性

详细说明

SplineControlAnimation 是一种从 `QVariantAnimation ` 派生的动画类型,用于定义样条控制点的动画效果。它可以在动画中利用 `QVariantAnimation ` 的功能和属性,例如 `duration ` 和 `easing`。这些动画封装在 `QParallelAnimationGroup ` 中,因此将并行运行。该动画不会影响 `SplineSeries` 的主控制点,而仅作用于该点两侧的两个控制手柄。 每个控制点都会依次进行线性插值。

本示例演示了如何同时使用SplineControlPointAnimation和GraphPointAnimation ,为SplineSeries 的主点序列及其控制点定义动画:

import QtGraphs

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

另请参阅 GraphTransition 和GraphPointAnimation 。

属性文档

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.