how to set offset in layout
-
I have a GridLayout in which I defined two columns. Left column should be spaces equal to left column length. I tried to create a white color rectangle which would act as an empty area like this:
GridLayout { columns: 2 // Trying to set rectangle as an offset for Label Rectangle { width: parent.width / 2 height: parent.height } Label { text: "some text" } }
That didn't work. So how would I go about creating left column as an offset for right column ?
-
I have a GridLayout in which I defined two columns. Left column should be spaces equal to left column length. I tried to create a white color rectangle which would act as an empty area like this:
GridLayout { columns: 2 // Trying to set rectangle as an offset for Label Rectangle { width: parent.width / 2 height: parent.height } Label { text: "some text" } }
That didn't work. So how would I go about creating left column as an offset for right column ?
-
@Ahti hi
Rectangle { // width: parent.width / 2 Layout.preferredWidth: parent.width / 2 // height: parent.height Layout.preferredHeight: parent.height color: "grey" }