summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-11-20 18:21:56 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-11-21 23:11:03 -0800
commit1e45e4460228a34ca2ecbae103d5d6a6e15e077b (patch)
treeecc81a69bc177b1cfc8155f58fc05aff9eee7a81
parent420321d7da0abecc4d49c4c0cb8bcd3b22269e1a (diff)
navigation: qtvirtualkeyboardplugin: add virtual keyboard
Add Qt virtual keyboard plugin to allow the entering of addresses Change-Id: Ic3a233b897e09bb09a4ca1cbdae241c34dc48656 Bug-AGL: SPEC-1068 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--app/app.pro5
-rw-r--r--app/main.cpp1
-rw-r--r--app/mapviewer.qml9
3 files changed, 15 insertions, 0 deletions
diff --git a/app/app.pro b/app/app.pro
index 3c0e40d..4eef717 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -5,6 +5,11 @@ PKGCONFIG += libhomescreen qlibwindowmanager
QT = qml network quick positioning location quickcontrols2
+static {
+ QTPLUGIN += qtvirtualkeyboardplugin
+ QT += svg
+}
+
SOURCES += main.cpp
RESOURCES += \
diff --git a/app/main.cpp b/app/main.cpp
index b8516b6..fb7dbed 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -56,6 +56,7 @@ int main(int argc, char *argv[])
QString myname = QString("Navigation");
+ qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
QGuiApplication app(argc, argv);
QQuickStyle::setStyle("AGL");
diff --git a/app/mapviewer.qml b/app/mapviewer.qml
index c99a2fc..a2d5c36 100644
--- a/app/mapviewer.qml
+++ b/app/mapviewer.qml
@@ -41,6 +41,7 @@
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
+import QtQuick.VirtualKeyboard 2.1
import QtLocation 5.6
import QtPositioning 5.5
import AGL.Demo.Controls 1.0
@@ -140,6 +141,14 @@ ApplicationWindow {
postalCode: "0791"
}
+ InputPanel {
+ id: inputPanel
+ visible: Qt.inputMethod.visible
+ y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+
MainMenu {
id: mainMenu