本页内容

PathCubic QML Type

定义一条具有两个控制点的三次贝塞尔曲线。更多...

Import Statement: import QtQuick

属性

详细说明

以下 QML 代码将生成如下所示的路径:

立方曲线

Path {
    startX: 20; startY: 0
    PathCubic {
        x: 180; y: 0
        control1X: -10; control1Y: 90
        control2X: 210; control2Y: 90
    }
}

另请参阅 Path 、PathQuad 、PathLine 、PathArc 、PathAngleArc 、PathCurve 、PathSvg 以及PathRectangle 。

属性文档

control1X : real

control1Y : real

定义第一个控制点的位置。

control2X : real

control2Y : real

定义第二个控制点的位置。

relativeControl1X : real

relativeControl1Y : real

relativeControl2X : real

relativeControl2Y : real

定义控制点相对于曲线起点的坐标位置。

如果为控制点的轴同时指定了相对和绝对控制位置,则将使用相对位置。

相对位置和绝对位置可以混合使用,例如,设置相对的 control1 x 和绝对的 control1 y 是有效的。

另请参阅 control1X 、control1Y 、control2X 以及control2Y 。

relativeX : real

relativeY : real

定义曲线相对于其起点的终点。

如果为单个轴同时指定了相对和绝对的终点位置,则将使用相对位置。

相对位置和绝对位置可以混合使用,例如,设置相对的 x 位置和绝对的 y 位置是有效的。

另请参阅 x 和y 。

x : real

y : real

定义曲线的端点。

另请参阅 relativeX 和relativeY 。

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