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

Properties

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.

ConstantDescription
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.