PathLine QML Type

Defines a straight line. More...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.8


  • x : real
  • y : real

Detailed Description

The example below creates a path consisting of a straight line from 0,100 to 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 }

Note: To import QtQuick.Shapes, you must link the Qul::Shapes module to your project. For more information, see Qt Quick Ultralite Shapes QML Types.

See also Path, PathQuad, PathCubic, PathArc, PathSvg, and PathMove.

Property Documentation

x : real

y : real

Defines the end point of the line.

Available under certain Qt licenses.
Find out more.