summaryrefslogtreecommitdiff
path: root/examples/webenginewidgets/simplebrowser/doc/src
diff options
context:
space:
mode:
authorValentin Fokin <fokinv@inf.u-szeged.hu>2017-11-21 13:39:26 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2018-02-02 07:43:03 +0000
commita66db09c6efe0d4dcc6d6a3cc93a000207da2175 (patch)
tree55104bb1ac6c8f61df869e87affc095ff4c6080c /examples/webenginewidgets/simplebrowser/doc/src
parent7c8c0414620cd3cb350e77cd88f83f83237eefa3 (diff)
downloadqtwebengine-a66db09c6efe0d4dcc6d6a3cc93a000207da2175.tar.gz
Make default context menus look more like chrome's one
- Implement EditFlags in ContextMenuData - Unify Quick and Widget default context menus - Add workaround for QTBUG-65044 - Update the SimpleBrowser example and its documentation [ChangeLog][QtWebEngine][QtWebEngineWidgets] Unify Quick and Widget default context menus Task-number: QTBUG-62414 Change-Id: I16a380f9f17e160497dfb8ac9c172341eb28c6c8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/webenginewidgets/simplebrowser/doc/src')
-rw-r--r--examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc b/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc
index 4f44d9f6c..4b39463b6 100644
--- a/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc
+++ b/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc
@@ -184,16 +184,18 @@
\section2 Adding Context Menu Items
- We add menu items to the context menu, so that users can right-click a link
- to have it opened in the same tab, a new window, or a new tab. We override
- QWebEngineView::contextMenuEvent and use
+ We add a menu item to the context menu, so that users can right-click to have an inspector
+ opened in a new window. We override QWebEngineView::contextMenuEvent and use
QWebEnginePage::createStandardContextMenu to create a default QMenu with a
default list of QWebEnginePage::WebAction actions.
- The default name for QWebEnginePage::OpenLinkInThisWindow action is
- \uicontrol Follow. For clarity, we rename it
- \uicontrol {Open Link in This Tab}. Also, we add the actions for opening
- links in a separate window or in a new tab:
+ The default name for QWebEnginePage::InspectElement action is
+ \uicontrol Inspect. For clarity, we rename it to \uicontrol {Open Inspector In New Window} when
+ there is no Inspector present yet,
+ and \uicontrol {Inspect Element} when it's already created.
+
+ We also check if the QWebEnginePage::ViewSource action is in the menu, because if it's not
+ we have to add a separator as well.
\quotefromfile webenginewidgets/simplebrowser/webview.cpp
\skipto WebView::contextMenuEvent(