How can I draw a SVG using qml in simple words?
According to QtDocs it is possible to draw a SVG using this code:
Path {
startX: 50; startY: 50
PathSvg { path: "L 150 50 L 100 150 z" }
}
But actually it doesn't. So, how can I draw SVG?
If you want to show a path, you must use it within a Shape
:
Shape {
ShapePath {
fillColor: "red"
strokeWidth: 2
strokeColor: "blue"
startX: 50; startY: 50
PathSvg { path: "L 150 50 L 100 150 z" }
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With