Zurück zu 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…

Auf pythonguis.com lesen

Eine Zusammenfassung aus einem öffentlichen Feed. Der vollständige Text steht auf der Website, die ihn veröffentlicht hat.