summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2023-04-11 15:48:26 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2023-07-29 20:35:44 +0000
commit3801a9244cb57bfb6b6b08be652f42a135b71142 (patch)
treeb4d675cdec8c7b3c4c27cc470b685ca9147fb9ce /src/webenginewidgets/api
parent0548893a182f2896c98ecc252e9811261a08d982 (diff)
Fix print button of PDF viewer plugin
Do not try to start print preview automatically, just notify the embedder via printRequested signal instead of crashing. Also fix the signal name in WebEngineView docs. Pick-to: 6.6 Task-number: QTBUG-104610 Change-Id: I251e0b8f6f03a73236320a66a0d3c7690939d88b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r--src/webenginewidgets/api/qwebengineview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 35fb98138..8d88726fa 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -1379,7 +1379,8 @@ void QWebEngineView::printToPdf(const std::function<void(const QByteArray&)> &re
\fn void QWebEngineView::printRequested()
\since 6.2
- This signal is emitted when the JavaScript \c{window.print()} method is called.
+ This signal is emitted when the JavaScript \c{window.print()} method is called or the user pressed the print
+ button of PDF viewer plugin.
Typically, the signal handler can simply call print().
\sa print()