def main(argv): app = QApplication(argv) window = MainWindow() window.show() window.raise_() window.clearFocus() app.exec_()