本页内容

C

PathLine QML Type

定义一条直线。更多...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.8

属性

  • x : real
  • y : real

详细说明

下面的示例创建了一条从 (0,100) 到 (200,100) 的直线路径:

import QtQuick
import QtQuick.Shapes
Rectangle {
    width: 300
    height: 300
    Shape {
        ShapePath {
            strokeColor: "black"
            startX: 0; startY: 100
            PathLine { x: 200; y: 100 }
        }
    }
}

注意:要 导入QtQuick.Shapes ,必须将Qul::Shapes 模块链接到您的项目中。有关详细信息,请参阅 Qt Quick Ultralite Shapes QML Types。

另请参阅 Path 、PathQuad 、PathCubic 、PathArc 、PathSvg 以及PathMove 。

属性文档

x : real

y : real

定义线的终点。

在某些 Qt 许可下可用。
了解更多信息。