Ok, you don't use layouts at all. Please read the doc about layouts: http://doc.trolltech.com/4.6/layout.html. Also I don't see a reason why you have a widget and a main window. You can put all into one! If you need different widgets inside a main window see QStackedWidget.