WebEngineContextMenuData QML Type

Provides context data for populating or extending a context menu with actions. More...

Import Statement: import QtWebEngine 1.3
Since: QtWebEngine 1.3


Detailed Description

WebEngineContextMenuData is returned by WebEngineView::contextMenuData() after a context menu event, and contains information about where the context menu event took place. This is also in the context in which any context specific WebEngineView::WebAction will be performed.

Property Documentation

isContentEditable : bool

Returns true if the content is editable by the user; otherwise returns false.

isValid : bool

Is true if the context data is valid; otherwise false.

linkText : string

Returns the text of a link if the context is a link.

linkUrl : url

Returns the URL of a link if the context is a link.

mediaType : enumeration

Returns the type of the media element or MediaTypeNone if the context is not a media element.

WebEngineContextMenuData.MediaTypeNoneThe context is not a media element.
WebEngineContextMenuData.MediaTypeImageThe context is an image element
WebEngineContextMenuData.MediaTypeVideoThe context is a video element
WebEngineContextMenuData.MediaTypeAudioThe context is an audio element
WebEngineContextMenuData.MediaTypeCanvasThe context is a canvas element
WebEngineContextMenuData.MediaTypeFileThe context is a file
WebEngineContextMenuData.MediaTypePluginThe context is a plugin

mediaUrl : url

If the context is a media element, returns the URL of that media.

position : point

Returns the position of the context, usually the mouse position where the context menu event was triggered.

selectedText : string

Returns the selected text of the context.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.