I've this code:
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
ColumnLayout {
spacing: 0
Rectangle {
Layout.fillWidth: true
height: 30
color: "blue"
Button {
text: "expand"
onClicked: r.height = 50
}
}
Rectangle {
id: r
Layout.fillWidth: true
height: 20
color: "red"
}
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: "lightgray"
}
}
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
ColumnLayout {
spacing: 0
Rectangle {
Layout.fillWidth: true
height: 30
color: "blue"
Button {
text: "expand"
onClicked: r.height = 50
}
}
Rectangle {
id: r
Layout.fillWidth: true
height: 20
color: "red"
}
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: "lightgray"
}
}
To copy to clipboard, switch view to plain text mode
When the button is pushed, the Rectangle r doesn't change the height. However, if the last Rectangle is changed by an Item, the height is changed.
Bookmarks