PathMove QML Type

移动路径的位置。更多

Import Statement: import QtQuick

属性

详细说明

下面的示例创建了一条由两条水平线组成的路径,两条线之间有一些空隙。所有三个线段的宽度都是 100:

Path {
    startX: 0; startY: 100
    PathLine { relativeX: 100; y: 100 }
    PathMove { relativeX: 100; y: 100 }
    PathLine { relativeX: 100; y: 100 }
}

注意: PathMove 不应在与PathView 相关联的路径中使用。请使用PathLine 代替。对于ShapePath 而言,重要的是要区分绘制直线和移动路径位置(不绘制任何内容)这两种操作。

另请参阅 Path,PathQuad,PathCubic,PathArc,PathAngleArc,PathCurve,PathSvgPathLine

属性文档

x : real

y : real

定义要移动到的位置。

另请参阅 relativeXrelativeY


relativeX : real

relativeY : real

定义相对于起始位置的移动位置。

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

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

另请参阅 xy


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