How to create a compact Qt4 vBoxLayout
Posted
by Gearoid Murphy
on Stack Overflow
See other posts from Stack Overflow
or by Gearoid Murphy
Published on 2010-06-14T15:29:03Z
Indexed on
2010/06/14
15:32 UTC
Read the original article
Hit count: 267
Hello all, I've got a vBoxLayout which contains 3 simple buttons, when I increase the size of the widget containing the layout, the spacing between the buttons increases. I would like to stop this behaviour and keep the buttons in a consistent and compact layout, regardless of the size of the parent widget. This is what I've got so far, but it doesn't change the spacing, any suggestions?, thanks.
button_layout = new QVBoxLayout ;
button_layout -> setSpacing(0);
button_layout -> setContentsMargins(0,0,0,0);
© Stack Overflow or respective owner