Solved How to centre align Items under Column
-
Hi
I am trying to centre align the text fields Under QML Column as shown below , but the text fields are always left aligned
Column { Text { text: "1" } Text { text: "2" } }
Regards,
James A -
Add
anchors.horizontalCenter: parent.horizontalCenter
to each of your text items and addwidth: parent.width
to ColumnColumn { width: parent.width Text { text: "1"; anchors.horizontalCenter: parent.horizontalCenter } Text { text: "2"; anchors.horizontalCenter: parent.horizontalCenter } }
-
Thanks for helping out. This helped me to fix the problem