Indeed, probably anchor layouts is what you want. If you want, as you said, components to be enlarged only on vertical, you can write, for instance:
@
Item {
id: rootItem
Rectangle {
id: anchoredRectangle
anchors.top: parent.top
anchors.topMargin: 17
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
anchors.horizontalCenter: parent.horizontalCenter // or, for example: anchors.right: parent.right
}
}
@
This way the Rectangle will be enlarged only on vertical axis when Item is enlarged.
Is something like this what you want?