QWebEngineNotification Class

QWebEngineNotification クラスは、HTML5 ウェブ通知のデータをカプセル化します。詳細...

ヘッダー #include <QWebEngineNotification>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake QT += webenginecore
QML で WebEngineNotification
継承: QObject

プロパティ

パブリック機能

Qt::LayoutDirection direction() const
QImage icon() const
QString language() const
bool matches(const QWebEngineNotification *other) const
QString message() const
QUrl origin() const
QString tag() const
QString title() const

パブリックスロット

void click() const
void close() const
void show() const

シグナル

void closed()

詳細説明

このクラスには、HTML5デスクトップ通知とプッシュ通知のための情報とAPIが含まれています。

Web エンジン通知は、QWebEngineProfile::setNotificationPresenter() 呼び出しで提供されるカスタム ハンドラを通じてユーザーに渡されます。

Web 通知を処理する方法の詳細については、通知例を参照してください。

プロパティ ドキュメント

[read-only] direction : const Qt::LayoutDirection

このプロパティは、通知のタイトルと本文のテキスト方向を保持します。

アクセス関数:

Qt::LayoutDirection direction() const

title() およびmessage()も参照してください

[read-only] language : const QString

このプロパティは、通知のタイトルと本文の主要言語を保持する。

その値は、有効な BCP 47 言語タグ、または空文字列です。

アクセス関数:

QString language() const

title() およびmessage()も参照してください

[read-only] message : const QString

このプロパティは、通知メッセージのボディを保持します。

アクセス関数です:

QString message() const

title()も参照してください

[read-only] origin : const QUrl

このプロパティは、通知を送信するページの URL を保持します。

アクセス関数です:

QUrl origin() const

[read-only] tag : const QString

このプロパティは、通知メッセージのタグを保持します。

既存の通知と同じタグと発信元URLを持つ新しい通知は、同じタグを持つ古い通知を置き換えるか更新する必要があります。

アクセス関数:

QString tag() const

matches()も参照してください

[read-only] title : const QString

このプロパティは、通知のタイトルを保持します。

アクセス関数です:

QString title() const

message()も参照してください

メンバー関数ドキュメント

[slot] void QWebEngineNotification::click() const

通知のJavaScriptクリックイベントを作成し、ディスパッチする。

notificationがユーザーによってアクティブにされたとき、notificationプラットフォームによって呼び出されるべきです。

[slot] void QWebEngineNotification::close() const

通知のJavaScriptcloseイベントを作成し、ディスパッチします。

notificationがクローズされるとき、基礎となるプラットフォームまたはユーザーによって、notificationプラットフォームによって呼び出されるべきです。

[signal] void QWebEngineNotification::closed()

このシグナルは、ウェブページが通知のクローズステップを呼び出し、表示する必要がなくなったときに発行されます。

QImage QWebEngineNotification::icon() const

通知と共に表示されるアイコンを返します。

送信者によってアイコンが設定されていない場合、NULLQImage が返されます。

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

2つの通知が同じメッセージチェーンに属する場合、true を返す。つまり、tag() とorigin() が同じ場合である。これは、一方がother の置換または更新であることを意味する。

tag() およびorigin()も参照して ください。

[slot] void QWebEngineNotification::show() const

通知のJavaScriptshowイベントを作成し、ディスパッチする。

通知がユーザに表示されたとき、通知プラットフォームによって呼び出されなければなりません。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.