Hi. I'm a newbie to Qt and I'm studying it using Python, but understanding C/C++ code is not a problem. My situation is this: I have a QHBoxLayout and I added a QGroupBox to it. Then I added some checkboxes to my QGroupBox (using a QVBoxLayout inside).

My problem is: when the window is resized, the checkboxes grow apart (I believe they grow vertically) and I want them to stay together, as they do when the QGroupBox is in its minimum size.

What should I do to achieve this?