How to align items in Row like space-between in css
Solved
QML and Qt Quick
-
wrote on 29 Jun 2022, 03:44 last edited by HarryC
I tried to find a similar topic, but couldn't find it.
I am trying to align 2 items start and end.
I used anchors stuff(anchors.right, anchors.margin) on my second item, but it didn't work.
What is a good way to align as follows;+-------------------------+ |Text ComboBox| +-------------------------+
Row { Text { anchors.verticalCenter: parent.verticalCenter ...... } ComboBox { width: 100 anchors.right: parent.right // it breaks whole alignment of Row block ...... } }
-
wrote on 29 Jun 2022, 04:38 last edited by HarryC
I have fixed this using RowLayout instead of Row.
After changing to RowLayoutLayout.alignment: Qt.AlignLeft // first item Layout.alignment: Qt.AlignRight // second item
1/2