Set a width to a layout
-
Hi everybody !
I am actually trying to create a window with Qt.
My window is separated in two parts : one menu that takes approximately 20% of the window's width and another taking 80%.
Thus i basically have 3 layouts :
One QHBoxLayout that contains 2 QVBoxLayout. However i can't seem to find a method which would set the first QVBoxLayout width to 20% of the window's size (i must really be a "noob"...).Maybe is there another way to build my window ?
Thanks !
-
@
myHBoxLayout->setStrechFactor(myFirstVBoxLayout,1);
myHBoxLayout->setStretchFactor(mySecondVBoxLayout,4);
@
this will stretch them in accordance to the space occupied by the QHBoxLayout in the window, which in your case seems to be the whole window...so this should work