Maybe I didn't understand some point about QtQuick.Layouts - GridLayout. I want to achieve the following:
This is a 4 columns layout. Red and green Rectangle takes 1 col and Blue take 2 cols. The code is:
Window {
visible: true
width: 800
height: 600
GridLayout {
id: grid
anchors.fill: parent
columns: 4
Rectangle {
Layout.fillWidth:true
Layout.fillHeight:true
Layout.columnSpan: 1
color: "red"
}
Rectangle {
Layout.fillWidth:true
Layout.fillHeight:true
Layout.columnSpan: 1
color: "green"
}
Rectangle {
Layout.fillWidth:true
Layout.fillHeight:true
Layout.columnSpan: 2
color: "blue"
}
}
}
When I run this code I get all 3 three Rectangles with same widths. What am I doing wrong?