K
K
Kastuś2018-05-25 12:37:35
Qt
Kastuś, 2018-05-25 12:37:35

How to center Row/Column in qml?

Question:
how to place the elements in the center (centerIn, horizontalCenter, verticalCenter) or the Column itself, Row on the area, what should I wrap or put down?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kastuś, 2018-05-25
@Gytim

I'll tell you my answer. We insert an
empty square with the width of the area minus the width of the remaining elements, which is 2 long.

J
Jacob E, 2018-05-25
@Zifix

Column {
    Text {
        text: qsTr("Hello world")
        anchors.horizontalCenter: parent.horizontalCenter
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question