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
- isContentEditable : bool
- isValid : bool
- linkText : string
- linkUrl : url
- mediaType : enumeration
- mediaUrl : url
- position : point
- selectedText : string
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
Returns true
if the content is editable by the user; otherwise returns false
.
linkUrl : url |
Returns the URL of a link if the context is a link.
Returns the type of the media element or MediaTypeNone
if the context is not a media element.
Constant | Description |
---|---|
WebEngineContextMenuData.MediaTypeNone | The context is not a media element. |
WebEngineContextMenuData.MediaTypeImage | The context is an image element |
WebEngineContextMenuData.MediaTypeVideo | The context is a video element |
WebEngineContextMenuData.MediaTypeAudio | The context is an audio element |
WebEngineContextMenuData.MediaTypeCanvas | The context is a canvas element |
WebEngineContextMenuData.MediaTypeFile | The context is a file |
WebEngineContextMenuData.MediaTypePlugin | The context is a plugin |
mediaUrl : url |
If the context is a media element, returns the URL of that media.
Returns the position of the context, usually the mouse position where the context menu event was triggered.