A request for showing a touch selection menu. More...
Import Statement: | import QtWebEngine |
Since: | QtWebEngine 6.3 |
A TouchSelectionMenuRequest is passed as an argument of the WebEngineView::touchSelectionMenuRequest signal. It provides further information about the context of the request. The selectionBounds property provides the origin of the request.
The accepted property of the request indicates whether the request is handled by the user code or the default touch selection menu should be displayed.
The following code uses a custom menu to handle the request:
WebEngineView { id: view // ... onTouchSelectionMenuRequested: function(request) { request.accepted = true; myMenu.x = request.selectionBounds.x; myMenu.y = request.selectionBounds.y; myMenu.trigger.connect(view.triggerWebAction); myMenu.popup(); } // ... }
accepted : bool |
Indicates whether the touch selection menu request has been handled by the signal handler.
If the property is false
after any signal handlers for WebEngineView::touchSelectionMenuRequested have been executed, a
default touch selection menu will be shown. To prevent this, set request.accepted
to true
.
The default is false
.
Note: The default content of the touch selection menu depends on the web element for which the request was actually generated.
[read-only] selectionBounds : rect |
The position of the bound rectangle from the touch text selection.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: