From a1e550a260f5c3e913631589fc5e54b064d8f0b0 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 1 Dec 2019 11:58:10 +0100 Subject: [PATCH] Work around QtVirtualKeyboard layering issues https://bugreports.qt.io/browse/QTBUG-56918 --- nymea-app/ui/Nymea.qml | 6 ++++++ nymea-app/ui/devicepages/DevicePageBase.qml | 3 +++ nymea-app/ui/thingconfiguration/ConfigureThingPage.qml | 3 +++ 3 files changed, 12 insertions(+) diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index 1d5365d7..229f4eda 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -415,8 +415,14 @@ ApplicationWindow { } + // NOTE: If using a Dialog, make sure closePolicy does not contain Dialo.CloseOnPressOutside + // or the virtual keyboard will close when pressing it... + + // https://bugreports.qt.io/browse/QTBUG-56918 KeyboardLoader { id: keyboardRect + parent: app.overlay + z: 1 anchors { left: parent.left; bottom: parent.bottom; right: parent.right } } } diff --git a/nymea-app/ui/devicepages/DevicePageBase.qml b/nymea-app/ui/devicepages/DevicePageBase.qml index 1c2d34ad..62e3990c 100644 --- a/nymea-app/ui/devicepages/DevicePageBase.qml +++ b/nymea-app/ui/devicepages/DevicePageBase.qml @@ -119,6 +119,9 @@ Page { MeaDialog { title: qsTr("Groups for %1").arg(root.device.name) headerIcon: "../images/view-grid-symbolic.svg" + // NOTE: If CloseOnPressOutside is active (default) it will break the QtVirtualKeyboard + // https://bugreports.qt.io/browse/QTBUG-56918 + closePolicy: Popup.CloseOnEscape RowLayout { Layout.leftMargin: app.margins diff --git a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml index 56167421..edd526c9 100644 --- a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml +++ b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml @@ -206,6 +206,9 @@ Page { y: app.margins standardButtons: Dialog.Ok | Dialog.Cancel + // NOTE: If CloseOnPressOutside is active (default) it will break the QtVirtualKeyboard + // https://bugreports.qt.io/browse/QTBUG-56918 + closePolicy: Popup.CloseOnEscape TextField { id: textField