Path Element Reference

A Path object defines a path for use by PathView.

This element was introduced in Qt 4.7.

Detailed Description

A Path object defines a path for use by PathView.

A Path is composed of one or more path segments - PathLine, PathQuad, PathCubic.

The spacing of the items along the Path can be adjusted via a PathPercent object.

PathAttribute allows named attributes with values to be defined along the path.

Properties

Property Documentation

This property holds whether the start and end of the path are identical.

This property holds the objects composing the path.

A path can contain the following path objects:

  • PathLine - a straight line to a given position.
  • PathQuad - a quadratic Bezier curve to a given position with a control point.
  • PathCubic - a cubic Bezier curve to a given position with two control points.
  • PathAttribute - an attribute at a given position in the path.
  • PathPercent - a way to spread out items along various segments of the path.
  1.     PathView  {
  2.         anchors.fill: parent
  3.         model: ContactModel  {}
  4.         delegate: delegate
  5.         path: Path  {
  6.             startX: 120; startY: 100
  7.             PathAttribute  { name: "iconScale"; value: 1.0 }
  8.             PathAttribute  { name: "iconOpacity"; value: 1.0 }
  9.             PathQuad  { x: 120; y: 25; controlX: 260; controlY: 75 }
  10.             PathAttribute  { name: "iconScale"; value: 0.3 }
  11.             PathAttribute  { name: "iconOpacity"; value: 0.5 }
  12.             PathQuad  { x: 120; y: 100; controlX: -20; controlY: 75 }
  13.         }
  14.     }

These properties hold the starting position of the path.

Notes provided by the Qt Community

No notes