Grid layout spacing issue (Solved)
I have cerated two grid layout inside a Rowlayout. It is working fine as i can see that each gridlayout with buttons.
But i have a problem that one gridlayout conists of 5 buttons and another one with 4 buttons. When i see the output the alignment looks in different size for each grids. If i provide same buttons for two grids then it will show the same alignment. But is there any way i can manage this without adding another button to make both equal.
you can set the Layout.minimumWidth: on the thiner or both Layouts. Just set them both to half of the window and they will use a minimum of half of the window:
width: 300; height: 300
For further information please read:
Tân Ngọc Đỗ
Hello, You can also span one button for more than one row using Layout.rowSpan
Or use an invisible Rectangle to fill a row. :)
[quote author="onek24" date="1395397082"]Or use an invisible Rectangle to fill a row. :)[/quote]
Thanks gain and sorry for the late reply.
I have tried rowspan and its working fine. Anyway the last options is nice, as we can set opacity of a button to -1 and it will create an empty space there.
Any way my problem is solved, thanks again.
i'm glad that it is solved. You can also set the color of the rectangle to "transparent", that will work too. Anyways, please add [solved] to the topic, thank you.