Switch from QWidget to QMainWindow