qdialog
Why does qApp. quit () require two calls from QDialog?
There is a code containing the main window and the dialog box. The dialog box starts immediately after the main one, because ...
ui.setupUi(MainWindow)
MainWindow.show()
dlg = Ui_Dialog(MainWindow.x(), MainWindow.y())
dlg.exec()
sys.exit(app.exec_())