From fa9a54db98334dd6759da62b0987809b71efeb7a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 23 Oct 2018 16:11:08 +1000 Subject: [PATCH] allow the initial setHtml() request to proceed Qt 5.11 appears to call acceptNavigationRequest() for the initial page load now. --- aqt/webview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aqt/webview.py b/aqt/webview.py index beb4a8ecd..cc0fce5a0 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -68,6 +68,9 @@ class AnkiWebPage(QWebEnginePage): def acceptNavigationRequest(self, url, navType, isMainFrame): if not isMainFrame: return True + # data: links generated by setHtml() + if url.scheme() == "data": + return True from aqt import mw # ignore href=# if url.toString().startswith(mw.serverURL()):