Python news に戻る

Python GUIs: Keeping Your Main Window Open After Closing a Dialog in PyQt6 — Why your app closes when you dismiss a dialog, and how to fix it

I'm working with dialogs in PyQt6, and when I press either Accept or Cancel, the entire application closes. How can I prevent this? When you create and display a dialog (for example, using QDialog.exec()), the dialog runs its own local event loop. Once you click OK or Cancel, the dialog closes and…

pythonguis.com で読む

公開フィードからの要約です。全文は公開元のサイトにあります。