Details
-
Suggestion
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.3.1
-
None
Description
Consider the following common layout task:
ColumnLayout { RowLayout { // Label, text field, button } RowLayout { // Label, Spin box } RowLayout { // Button, button } }
Currently it is virtually impossible to do all that layout correctly with nice looking margins.
1. `anchors.margin:` doesn't work when not using anchors.
2. `spacing:` only affects things inside the layout, it can't be used to add spacing around the layout.
3. You can add dummy spacer `Item`s but that only lets you add fake margins in the dimension of the layout (i.e. vertically for a ColumnLayout, horizontally for a RowLayout).
I'm not saying it's not impossible. It's just not nearly as easy as I've come to expect from Qt.
The solution is pretty easy, just create a `Layout.margins` similar to `anchor.margins`.
Attachments
Issue Links
- relates to
-
QTBUG-39724 Support of margins is needed in layouts
- Closed