Focus on the exception window (#2282)

This commit is contained in:
Raffson 2022-06-29 05:31:07 +02:00 committed by GitHub
parent 8c2c353071
commit def611ef89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,