On this page

C

Shape QML Type

Renders a path. More...

Import Statement: import QtQuick.Shapes
Since: Qt Quick Ultralite 1.8
Inherits:

Item

Inherited By:

ArcItem

Properties

Detailed Description

See Path for a detailed overview of the supported path elements.

Shape {
    width: 200
    height: 150
    anchors.centerIn: parent
    ShapePath {
        strokeWidth: 4
        strokeColor: "red"

        startX: 20; startY: 20
        PathLine { x: 180; y: 130 }
        PathLine { x: 20; y: 130 }
        PathLine { x: 20; y: 20 }
    }
}

See also Qt Quick Ultralite shapes Example, Path, PathMove, PathLine, PathQuad, PathCubic, PathArc, and PathSvg.

Property Documentation

rotation : real

This property holds the rotation of the item in degrees clockwise around its transformOrigin.

The default value is 0 degrees (that is, no rotation).

See also Transform and Rotation.


scale : real

This property holds the scale factor for this item.

A scale of less than 1.0 renders the item smaller, whereas a scale greater than 1.0 renders the item larger. A negative scale causes the item to be mirrored when rendered.

The default value is 1.0.

Scaling is applied from the transformOrigin.

See also Transform and Scale.


transform : list<Transform>

This property holds the list of transformations to apply.

For more information see Transform.


transformOrigin : Item:TransformOrigin [default]

This property holds the origin point around which scale and rotation transform.

Nine transform origins are available, as shown in the image below.

Nine transform origin points illustrated using a rectangle.

To set an arbitrary transform origin point, use the Scale or Rotation transform types with transform.


Available under certain Qt licenses.
Find out more.