Put everything that is inside the QWidget "centralWidget" inside a layout of some sort. Look at the Qt Layout examples and follow the link on that page to Layout Management for the explanation of how it all works.