First add the widgets, then the layout and finally tweak the sizePolicy, horizontalStretch, verticalStretch, minimumSize and maximumSize properties of those widgets.