Solved Best way to left/right align objects
-
I'm designing a QML page like the usual "Android settings page" (i.e. https://goo.gl/images/Mk3PHs).
I'm wondering which is the best way to align objects to the left and right of the container.I can do it manually with anchors, but it will a pain if I need to change the order of the items (I need to change top and bottom anchorages).
GridLayout seems a good fit, where the cell size is the smallest one (i.e. the objects on the right) and the left items spans over the N-1 columns.
Any other suggestion?
-
@Mark81
My suggestion:
dont create a whole page as one component.
Create each line as a single component and use anchors inside each of them. -
Good point. In this case what the best choice for the container of each single item component? An
Item
? -
@Mark81
for example.
Or a Rectangle if you want to choose a border and/or background color