Setting maximumSize() on the main window to the screen size should help.