summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc5
-rw-r--r--examples/webengine/recipebrowser/resources/qml/main.qml5
2 files changed, 8 insertions, 2 deletions
diff --git a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
index 5327a0b26..d33f6bf10 100644
--- a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
+++ b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
@@ -106,10 +106,11 @@
We then disable the \l{WebEngineSettings::focusOnNavigationEnabled}{focusOnNavigationEnabled}
setting to make sure that the \l{WebEngineView} does not steal focus from the \c RecipeList
item every time its URL is changed. This allows the user to continue navigating through the
- recipes using the keyboard.
+ recipes using the keyboard. We also disable the default context menu by accepting the
+ ContextMenuRequest.
\skipto focusOnNavigationEnabled
- \printuntil focusOnNavigationEnabled
+ \printto firstLoadComplete
When the application starts, instead of directly showing the \l{WebEngineView}, we show a
placeholder \l{Rectangle} with a \l{BusyIndicator} to provide a nicer user experience while the
diff --git a/examples/webengine/recipebrowser/resources/qml/main.qml b/examples/webengine/recipebrowser/resources/qml/main.qml
index 84067e8f5..b49cb6649 100644
--- a/examples/webengine/recipebrowser/resources/qml/main.qml
+++ b/examples/webengine/recipebrowser/resources/qml/main.qml
@@ -102,6 +102,11 @@ ApplicationWindow {
// Make sure focus is not taken by the web view, so user can continue navigating
// recipes with the keyboard.
settings.focusOnNavigationEnabled: false
+
+ onContextMenuRequested: function(request) {
+ request.accepted = true
+ }
+
property bool firstLoadComplete: false
onLoadingChanged: {
if (loadRequest.status === WebEngineView.LoadSucceededStatus