QWebEngineNotification Class

The QWebEngineNotification class encapsulates the data of an HTML5 web notification. More...

Header: #include <QWebEngineNotification>
Since: Qt 5.13
Inherits: QObject

This class was introduced in Qt 5.13.

Properties

  • 1 property inherited from QObject

Public Functions

QWebEngineNotification()
QWebEngineNotification::Direction direction() const
QIcon icon() const
bool isNull() const
QString language() const
bool matches(const QWebEngineNotification &other) const
QString message() const
QUrl origin() const
QString tag() const
QString title() const
  • 16 public functions inherited from QObject

Public Slots

void click() const
void close() const
void show() const
  • 1 public slot inherited from QObject

Signals

void closed()
typedef QObjectList

Macros

Additional Inherited Members

  • 5 static public members inherited from QObject
  • 8 protected functions inherited from QObject

Detailed Description

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

Property Documentation

direction : const Direction

This property holds the text direction for the notification's title and body.

Access functions:

QWebEngineNotification::Direction direction() const

See also title() and message().

icon : const QIcon

This property holds the icon to be shown with the notification.

If no icon is set by the sender, an null QIcon is returned.

Access functions:

QIcon icon() const

language : const QString

This property holds the primary language for the notification's title and body.

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

Access functions:

QString language() const

See also title() and message().

message : const QString

This property holds the body of the notification message.

Access functions:

QString message() const

See also title().

origin : const QUrl

This property holds the URL of the page sending the notification.

Access functions:

QUrl origin() const

tag : const QString

This property holds 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.

Access functions:

QString tag() const

See also matches().

title : const QString

This property holds the title of the notification.

Access functions:

QString title() const

See also message().

Member Function Documentation

QWebEngineNotification::QWebEngineNotification()

Creates a null QWebEngineNotification.

See also isNull().

[slot] void QWebEngineNotification::click() const

Creates and dispatches a JavaScript click event on notification.

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

[slot] void QWebEngineNotification::close() const

Creates and dispatches a JavaScript close event on notification.

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

[signal] void QWebEngineNotification::closed()

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

[slot] void QWebEngineNotification::show() const

Creates and dispatches a JavaScript show event on notification.

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

bool QWebEngineNotification::isNull() const

Returns true if the notification is a default constructed null notification.

bool QWebEngineNotification::matches(const QWebEngineNotification &other) const

Returns true if the two notifications belong to the same message chain. That is, if their tag() and origin() are the same. This means one is a replacement or an update of the other.

See also tag() and origin().