How to QVBoxLayout setFixedWidth
-
wrote on 20 Aug 2020, 09:32 last edited by
Hello Guys
I have a main layout comprising of 2 sub layouts leftlayout and rightlayout. They are both QVBoxLayouts and i would like to the widths to 30% for the laeftlayout and 70% for the rightlayout.
Any suggestions or tips would be appreciated.
Thanks
Simon
-
wrote on 20 Aug 2020, 09:43 last edited by
Hi,
Try with QSplitter and function QSplitter::setStretchFactor -
wrote on 20 Aug 2020, 09:45 last edited by
Thanks i'll give it a go
-
Hi,
Unless you want them to be movable, use the stretch factor parameter when adding your sub-layout to your main layout.
-
Hi,
Unless you want them to be movable, use the stretch factor parameter when adding your sub-layout to your main layout.
wrote on 21 Aug 2020, 12:40 last edited by@SGaist Thanks i will give that a try
3/5