Unfortunately, I am not able to set the height of a TextArea in a ColumnLayout. The property height doesn’t seem to have any influence on the displayed height of the TextArea. Code snipped:
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
Rectangle {
id: mainRect
width: 200
height: 200
ColumnLayout {
id: colLayout
anchors.fill: parent
Label { text: qsTr("Label") }
TextArea {
text: "This wants to grow horizontally and should have a fixed height"
Layout.fillWidth: true
//Layout.fillHeight: false
height: 30
//Layout.height: 40 // => non-existent property "height"
}
Button {
text: "Button"
}
}
}
How can I fix this? Do I have to use another property?
Thank you for any help!
PS: If I use Column, the height of the TextArea behaves correctly. (But then there is an issue with the width, which is why I would prefer to use ColumnLayout…)
↧