change MainWindow class to QWidget