From 496e074f29970b6bd4e9e84dcb390443d56517cf Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 25 May 2022 21:46:47 +1000 Subject: [PATCH] Possible fix for Qt 6.3 crashes As mentioned on #1879, the dialog.deleteLater() call appears to be causing crashes on some systems on Qt 6.3. Explicitly destroying the page prior to the containing webview appears to work around the issue. --- qt/aqt/webview.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index b2975fdeb..4f24274aa 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -702,6 +702,7 @@ html {{ {font} }} gui_hooks.theme_did_change.remove(self.on_theme_did_change) mw.mediaServer.clear_page_html(id(self)) + self._page.deleteLater() def on_theme_did_change(self) -> None: # avoid flashes if page reloaded