tags:

views:

620

answers:

2

I designed a QMainWindow with QtCreator's designer. It consists of the default central widget (a QWidget) which contains a QVBoxLayout with all the other widgets in it. Now everything I want, is that the QVBoxLayout automatically occupies the whole central widgets rectangle space.

How can I do this? I didn't find any usable property neither in the central widgets properties nor the QVBoxLayout's ones.

+4  A: 
Georg
Very nice, that's what I was after. Thanks!
milan1612
+1  A: 

Add at least one widget on your MainWindow. Then select your window by clicking on it and click on the VerticalLayout Button at the top of QTCreator. You Vertical Layout is automatically added to the central widget and fills all the surface.

Patrice Bernassola
More or less the same as gs's answer, but thanks!
milan1612