WebEngineNotification QML Type

Encapsulates the data of an HTML5 web notification. 更多...

import 語句: import QtWebEngine 1.10
Since: QtWebEngine 1.9
實例化: QWebEngineNotification

特性

信號

方法

詳細描述

This type contains the information and API for HTML5 desktop and push notifications.

Web engine notifications are passed to the user in the WebEngineProfile::presentNotification() 信號。

For more information about how to handle web notification, see the 通知範例 .

特性文檔編製

direction : enumeration

The text direction for the notification's title and body.

常量 描述
Qt.LeftToRight Items are laid out from left to right.
Qt.RightToLeft Items are laid out from right to left.
Qt.LayoutDirectionAuto The direction to lay out items is determined automatically.

語言 : string

The primary language for the notification's title and body.

Its value is a valid BCP 47 language tag, or the empty string.

message : string

The body of the notification message.

origin : url

The URL of the page sending the notification.

tag : string

The tag of the notification message.

New notifications that have the same tag and origin URL as an existing one should replace or update the old notification with the same tag.

title : string

The title of the notification.

信號文檔編製

closed ()

This signal is emitted when the web page calls close steps for the notification, and it no longer needs to be shown.

注意: 相應處理程序是 onClosed .

方法文檔編製

void click ()

創建並分派 JavaScript click event on notification.

Should be called by the notification platform when the notification is activated by the user.

void close ()

創建並分派 JavaScript 關閉事件 on notification.

Should be called by the notification platform when the notification is closed, either by the underlying platform or by the user.

void show ()

創建並分派 JavaScript show event on notification.

Should be called by the notification platform when the notification has been shown to user.