Building QML Applications resolution independent
QML and Qt Quick
5
Posts
4
Posters
12.8k
Views
1
Watching
-
I'm looking for something like a space separator, because I'm also interested in elements location. I need to maintain some elements with original sizes , but I want some elements to be enlarged only on horizontal or vertical. something similar to qt native widgets, but in QML.
-
Maybe extensive use of anchoring will help you? It will be easier to say if you will provide some mockup of what you need.
-
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: rootItemRectangle { 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?