summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2016-09-30 12:29:12 +0200
committerKai Koehne <kai.koehne@qt.io>2016-10-06 13:51:34 +0000
commit1c16d39da263ba97e8bafcc55e9dd78592d7b9bd (patch)
treeb4f33216462e49e27a0465c593978e9baa34e70c
parent7439343d169095a510d122ad7c69646a5946cdce (diff)
Doc: Do not advise to overwrite QWidget::contextMenuEvent()
There's also QWidget::setContextMenuPolicy and QWidget::customContextMenuRequested, which is arguably a better approach. Anyhow, this isn't specific to QWebEngineView, so let's leave it at that. Finally, there's no need to call triggerPageAction if you add an action to a menu. Change-Id: I0c84038746a78316ed6b90a98b68fa5eb95fbad5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 5a4c1b52b..5b96459af 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -65,16 +65,13 @@
The zoomFactor() property enables zooming the contents of the web page by a
scale factor.
- If you require a custom context menu, you can implement it by reimplementing
- \l{QWidget::}{contextMenuEvent()} and populating your QMenu with the actions
- obtained from pageAction(). Additional functionality, such as reloading the view,
- copying selected text to the clipboard, or pasting into the view, is
- encapsulated within the QAction objects returned by pageAction(). These
- actions can be programmatically triggered using triggerPageAction().
- Alternatively, the actions can be added to a toolbar or a menu directly.
- The web view maintains the state of the returned actions but allows
- modification of action properties such as \l{QAction::}{text} or
- \l{QAction::}{icon}.
+ The widget features a context menu that is tailored to the element at
+ hand, and includes actions useful in a browser. For a custom context menu,
+ or for embedding actions in a menu or toolbar, the individual actions are available
+ via \l pageAction(). The web view maintains the state of the returned actions,
+ but allows modification of action properties such as \l{QAction::}{text} or
+ \l{QAction::}{icon}. The action semantics can also be triggered directly through
+ triggerPageAction().
If you want to provide support for web sites that allow the user to open
new windows, such as pop-up windows, you can subclass QWebEngineView and