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가 포함되어 있습니다.

웹 엔진 알림은 QWebEngineProfile::setNotificationPresenter() 호출과 함께 제공되는 사용자 지정 핸들러를 통해 사용자에게 전달됩니다.

웹 알림을 처리하는 방법에 대한 자세한 내용은 알림 예시를 참조하세요.

속성 문서

[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

알림에서 자바스크립트 클릭 이벤트를 생성하고 전송합니다.

사용자가 알림을 활성화할 때 알림 플랫폼에서 호출해야 합니다.

[slot] void QWebEngineNotification::close() const

알림에서 자바스크립트 닫기 이벤트를 생성하고 발송합니다.

기본 플랫폼 또는 사용자에 의해 알림이 닫힐 때 알림 플랫폼에서 호출해야 합니다.

[signal] void QWebEngineNotification::closed()

이 신호는 웹 페이지에서 알림 닫기 단계를 호출할 때 발생하며, 더 이상 표시할 필요가 없습니다.

QImage QWebEngineNotification::icon() const

알림과 함께 표시할 아이콘을 반환합니다.

발신자가 아이콘을 설정하지 않으면 null QImage 이 반환됩니다.

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

두 알림이 동일한 메시지 체인에 속하는 경우 true 을 반환합니다. 즉, tag()와 origin()가 동일한 경우입니다. 즉, 하나는 other 의 대체 또는 업데이트입니다.

tag() 및 origin()도 참조하세요 .

[slot] void QWebEngineNotification::show() const

알림에 자바스크립트 표시 이벤트를 생성하고 발송합니다.

알림이 사용자에게 표시되었을 때 알림 플랫폼에서 호출해야 합니다.

© 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.