Creating dashed lines
Moved
Unsolved
QML and Qt Quick
-
I am totally new to qt and qml. Can someone please tell me how to make the border have dashed lines to this preexisting code. Thank you
}
// Trial border
Rectangle {
id: veritcalGuide
width: 34
height: parent.height
opacity: 0.8
color: "Transparent"
border.color: "#a0a0a0"
enabled: false
antialiasing: true
anchors.centerIn: parent
} -
You cannot use/add dashed lines on Rectangle, you need to use Shape or Canvas to create the shape then you can choose to have solid or dashed lines.
https://doc.qt.io/qt-5/qml-qtquick-shapes-shape.html
Canvas example; https://forum.qt.io/topic/59139/dotted-lines-in-qml/5