| 1 |
import QtQuick 2.9 |
| 2 |
import tst_qquickpathitem 1.0 |
| 3 |
|
| 4 |
Item { |
| 5 |
width: 200 |
| 6 |
height: 150 |
| 7 |
|
| 8 |
Shape { |
| 9 |
vendorExtensionsEnabled: false |
| 10 |
objectName: "pathItem" |
| 11 |
anchors.fill: parent |
| 12 |
|
| 13 |
ShapePath { |
| 14 |
strokeWidth: 4 |
| 15 |
strokeColor: "red" |
| 16 |
fillGradient: LinearGradient { |
| 17 |
x1: 20; y1: 20 |
| 18 |
x2: 180; y2: 130 |
| 19 |
GradientStop { position: 0; color: "blue" } |
| 20 |
GradientStop { position: 0.2; color: "green" } |
| 21 |
GradientStop { position: 0.4; color: "red" } |
| 22 |
GradientStop { position: 0.6; color: "yellow" } |
| 23 |
GradientStop { position: 1; color: "cyan" } |
| 24 |
} |
| 25 |
strokeStyle: ShapePath.DashLine |
| 26 |
dashPattern: [ 1, 4 ] |
| 27 |
startX: 20; startY: 20 |
| 28 |
PathLine { x: 180; y: 130 } |
| 29 |
PathLine { x: 20; y: 130 } |
| 30 |
PathLine { x: 20; y: 20 } |
| 31 |
} |
| 32 |
} |
| 33 |
} |