I'm new to QML, so I may be asking something obvious. I'm struggling to stack elements in ColumnLayout on top of each other. There's just too much spacing between them I can't do anything about. See screenshot for more details:
Here's the actual QML:
ColumnLayout {
anchors.fill: parent
spacing: 0
Rectangle {
color: "blue"
Layout.fillWidth: true
height: 50
}
Rectangle {
color: "red"
Layout.fillWidth: true
height: 50
}
Rectangle {
color: "yellow"
Layout.fillWidth: true
height: 50
}
}
What I'm trying to do is to have the rectangles aligned top to bottom and have spacing between them maybe 2-3 pixels.
Thanks
margins
andalignment
properties in anyLayout
does seems to collide with the answer statement that "layouts good thing if you don't need to manage positions". – BaCaRoZzo