From f4ca67aa7f70f58d39ef8689ddd5910e215ed6cd Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Thu, 31 Jan 2019 13:08:21 +0100 Subject: Web Notifications API Implements API for end-user notifications. Co-authored by Allan Sandfeld Jensen [ChangeLog][Profile] Support for Web Notifications API for end-user notifications through QWebEngineNotification Task-number: QTBUG-50995 Fixes: QTBUG-51191 Change-Id: Icebaaa05275a713e801f1f8ecdaaec725fa264c8 Reviewed-by: Allan Sandfeld Jensen --- tests/quicktestbrowser/BrowserWindow.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/quicktestbrowser/BrowserWindow.qml') diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml index 22f98e1c5..381e9c142 100644 --- a/tests/quicktestbrowser/BrowserWindow.qml +++ b/tests/quicktestbrowser/BrowserWindow.qml @@ -505,6 +505,18 @@ ApplicationWindow { download.accept() } + MessageDialog { + id: notificationDialog + width: 200 + standardButtons: StandardButton.Ok + } + + function onUserNotification(notification) { + notificationDialog.title = notification.title + notificationDialog.text = notification.origin.toString() + '\n' + notification.message + notificationDialog.open() + } + ZoomController { id: zoomController y: parent.mapFromItem(currentWebView, 0 , 0).y - 4 -- cgit v1.2.3