QWebEngineNotification#

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

Inheritance diagram of PySide6.QtWebEngineCore.QWebEngineNotification

Synopsis#

Properties#

  • direction - Text direction for the notification’s title and body

  • language - Primary language for the notification’s title and body

  • message - Body of the notification message

  • origin - URL of the page sending the notification

  • tag - Of the notification message

  • title - Of the notification

Functions#

Slots#

Signals#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

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

Web engine notifications are passed to the user through the custom handler provided with the setNotificationPresenter() call.

For more information about how to handle web notification, see the Notification Example .

class PySide6.QtWebEngineCore.QWebEngineNotification#

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtWebEngineCore.QWebEngineNotification.direction: LayoutDirection#

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

See also

title() message()

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineNotification.language: str#

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.

See also

title() message()

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineNotification.message: str#

This property holds The body of the notification message..

See also

title()

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineNotification.origin: PySide6.QtCore.QUrl#

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

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineNotification.tag: str#

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.

See also

matches()

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineNotification.title: str#

This property holds The title of the notification..

See also

message()

Access functions:
PySide6.QtWebEngineCore.QWebEngineNotification.click()#

Creates and dispatches a JavaScript click event on notification.

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

PySide6.QtWebEngineCore.QWebEngineNotification.close()#

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.

PySide6.QtWebEngineCore.QWebEngineNotification.closed()#

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

PySide6.QtWebEngineCore.QWebEngineNotification.direction()#
Return type:

LayoutDirection

Getter of property direction .

PySide6.QtWebEngineCore.QWebEngineNotification.icon()#
Return type:

PySide6.QtGui.QImage

Returns the icon to be shown with the notification.

If no icon is set by the sender, a null QImage is returned.

PySide6.QtWebEngineCore.QWebEngineNotification.language()#
Return type:

str

Getter of property language .

PySide6.QtWebEngineCore.QWebEngineNotification.matches(other)#
Parameters:

otherPySide6.QtWebEngineCore.QWebEngineNotification

Return type:

bool

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() origin()

PySide6.QtWebEngineCore.QWebEngineNotification.message()#
Return type:

str

Getter of property message .

PySide6.QtWebEngineCore.QWebEngineNotification.origin()#
Return type:

PySide6.QtCore.QUrl

Getter of property origin .

PySide6.QtWebEngineCore.QWebEngineNotification.show()#

Creates and dispatches a JavaScript show event on notification.

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

PySide6.QtWebEngineCore.QWebEngineNotification.tag()#
Return type:

str

Getter of property tag .

PySide6.QtWebEngineCore.QWebEngineNotification.title()#
Return type:

str

Getter of property title .