I've got 3 basic elements in a rectangle and I'd like to draw line separations between them.
I don't find an easy way to achieve that, as a border-left
would do in CSS.
Text {
id : txtNote
text : (__notes.length>0)?__notes[0].extname.name:"--"
anchors.right: txtNoteAcc.left
leftPadding: 5
rightPadding: 0
}
Image {
id : txtNoteAcc
height : 20
width : 20
anchors.right: txtNoteHead.left
}
Image {
id : txtNoteHead
height : 20
width : 20
anchors.right: parent.right
}
Now laid out as:
And the goal is to have it a similar way (this example is a Java one):
I've found this approach, but I don't call it "simple" and it is 7 years old.
Rem: I'm working with QML 5.9 (so Shape is not available).
question from:
https://stackoverflow.com/questions/65903236/how-to-draw-a-single-sided-line-border-in-qml 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…