This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/nymea-app/ui/KeyboardLoader.qml
2019-05-22 13:41:38 +02:00

33 lines
867 B
QML

import QtQuick 2.4
Item {
id: root
implicitHeight: active ? childrenRect.height : 0
property bool active: d.kbd && d.kbd.active
Behavior on implicitHeight { NumberAnimation { duration: 130; easing.type: Easing.InOutQuad } }
QtObject {
id: d
property var kbd: null
property string virtualKeyboardString:
'
import QtQuick 2.8;
import QtQuick.VirtualKeyboard 2.1
InputPanel {
id: inputPanel
y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
anchors.left: parent.left
anchors.right: parent.right
}
'
}
Component.onCompleted: {
if (useVirtualKeyboard) {
d.kbd = Qt.createQmlObject(d.virtualKeyboardString, root);
}
}
}