| 1 |
import QtQuick 2.15 |
| 2 |
import QtQuick.Shapes 1.0 |
| 3 |
|
| 4 |
Item { |
| 5 |
width: 320 |
| 6 |
height: 480 |
| 7 |
|
| 8 |
Column { |
| 9 |
Item { |
| 10 |
width: 200 |
| 11 |
height: 160 |
| 12 |
|
| 13 |
Shape { |
| 14 |
anchors.fill: parent |
| 15 |
vendorExtensionsEnabled: false |
| 16 |
|
| 17 |
ShapePath { |
| 18 |
fillColor: "transparent" |
| 19 |
strokeColor: "blue" |
| 20 |
strokeStyle: ShapePath.DashLine |
| 21 |
strokeWidth: 4 |
| 22 |
|
| 23 |
PathText { |
| 24 |
x: 96 |
| 25 |
y: 10 |
| 26 |
font.pixelSize: 120 |
| 27 |
text: "Qt" |
| 28 |
} |
| 29 |
} |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
Item { |
| 34 |
width: 200 |
| 35 |
height: 160 |
| 36 |
|
| 37 |
Rectangle { |
| 38 |
anchors.fill: parent |
| 39 |
color: "blue" |
| 40 |
} |
| 41 |
|
| 42 |
Shape { |
| 43 |
anchors.fill: parent |
| 44 |
vendorExtensionsEnabled: false |
| 45 |
|
| 46 |
ShapePath { |
| 47 |
fillColor: "red" |
| 48 |
strokeColor: "blue" |
| 49 |
strokeStyle: ShapePath.DashLine |
| 50 |
capStyle: ShapePath.RoundCap |
| 51 |
strokeWidth: 8 |
| 52 |
|
| 53 |
PathText { |
| 54 |
x: 96; y: 10 |
| 55 |
font.pixelSize: 150 |
| 56 |
text: "Qt" |
| 57 |
} |
| 58 |
} |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
Item { |
| 63 |
width: 200 |
| 64 |
height: 160 |
| 65 |
|
| 66 |
Shape { |
| 67 |
anchors.fill: parent |
| 68 |
vendorExtensionsEnabled: false |
| 69 |
|
| 70 |
ShapePath { |
| 71 |
fillGradient: LinearGradient { |
| 72 |
x1: 0; x2: 200; y1: 0; y2: 160 |
| 73 |
spread: ShapeGradient.PadSpread |
| 74 |
GradientStop { position: 0.0; color: "red"; } |
| 75 |
GradientStop { position: 1.0; color: "green"; } |
| 76 |
} |
| 77 |
strokeColor: "blue" |
| 78 |
strokeStyle: ShapePath.DashLine |
| 79 |
joinStyle: ShapePath.RoundJoin |
| 80 |
strokeWidth: 4 |
| 81 |
|
| 82 |
PathText { |
| 83 |
x: 96; y: 10 |
| 84 |
font.pixelSize: 150 |
| 85 |
text: "Qt" |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
} |
| 90 |
} |
| 91 |
} |