From 48289b9378fb59d908f54b0585c4b0fe0e7b319e Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sun, 6 Oct 2024 01:33:14 -0400 Subject: [PATCH] feat(browser): enable PDF support Fixes #1261. --- src/libs/browser/webview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/browser/webview.cpp b/src/libs/browser/webview.cpp index fc564307..f13fc738 100644 --- a/src/libs/browser/webview.cpp +++ b/src/libs/browser/webview.cpp @@ -37,6 +37,9 @@ WebView::WebView(QWidget *parent) setPage(new WebPage(this)); setZoomLevel(defaultZoomLevel()); + // Enable plugins for PDF support. + settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); + settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false); QApplication::instance()->installEventFilter(this);