It'd be nice if you also provided the contents of the layouts and the call to setLayout on Mainwindow.
Forum Rules
Bookmarks