fix QWebEngineView's navigation request issue in Qt 5.12

This commit is contained in:
Le Tan 2019-03-06 15:14:11 +08:00
parent 470a40c80b
commit bda9bf51c1

View File

@ -24,6 +24,9 @@ bool VPreviewPage::acceptNavigationRequest(const QUrl &p_url,
} }
} else if (!p_isMainFrame) { } else if (!p_isMainFrame) {
return true; return true;
} else if (p_url.scheme() == "data") {
// Qt 5.12 will trigger this when calling QWebEngineView.setHtml().
return true;
} }
QDesktopServices::openUrl(p_url); QDesktopServices::openUrl(p_url);