From baeb20b2e720f5c683cf3810116d827e1561c4b2 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 13 Jun 2016 12:38:51 +0200 Subject: Add Qt Quick Controls 2 support for dialogs QtQuickControls1 does not handle embedded platforms too well. In case of eglfs platform we crash badly - only one window is supported. QtQuickControls2 on the other hand lacks the native look on desktop. Therefore on desktop platforms keep using QtQuickControls1, and on eglfs use QtQuickControls2. QtQuick.Dialogs are not implemented for QtQuickControls2, moreover required authentication dialog and prompt dialog are neither implemented in QtQuickControls1. As a workaround make new dialogs to give consistent look and feel. Replace close() with reject() signal in java script prompt dialog to unify handling between qqc1 and qqc2 [ChangeLog][QtWebEngine][General] Qt WebEngine (QML) now optionally uses Qt Quick 2 Controls to show standard dialogs. Task-number: QTBUG-53467 Task-number: QTBUG-51177 Change-Id: I42f9506357bbb82d4f04465f30a18c8013439e25 Reviewed-by: Kai Koehne --- src/webengine/ui/PromptDialog.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/webengine/ui/PromptDialog.qml') diff --git a/src/webengine/ui/PromptDialog.qml b/src/webengine/ui/PromptDialog.qml index 657bf7631..d9fc61cf8 100644 --- a/src/webengine/ui/PromptDialog.qml +++ b/src/webengine/ui/PromptDialog.qml @@ -53,6 +53,10 @@ ApplicationWindow { height: 100 flags: Qt.Dialog + onClosing: { + rejected(); + } + function open() { show(); } -- cgit v1.2.3