From def611ef89b536dbb630cba444068b665bc8ad92 Mon Sep 17 00:00:00 2001 From: Raffson Date: Wed, 29 Jun 2022 05:31:07 +0200 Subject: [PATCH] Focus on the exception window (#2282) --- qt_ui/uncaughtexceptionhandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/uncaughtexceptionhandler.py b/qt_ui/uncaughtexceptionhandler.py index 6e046fcf..7895a222 100644 --- a/qt_ui/uncaughtexceptionhandler.py +++ b/qt_ui/uncaughtexceptionhandler.py @@ -33,7 +33,7 @@ class UncaughtExceptionHandler(QObject): def show_exception_box(self, message: str, exception: str) -> None: if QApplication.instance() is not None: QMessageBox().critical( - self.parent(), + QApplication.focusWidget(), "An unexpected error occurred", "\n".join([message, "", exception]), QMessageBox.Ok,