Switch MainWindow to inherit from QMainWindow