From 1e45e4460228a34ca2ecbae103d5d6a6e15e077b Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Mon, 20 Nov 2017 18:21:56 -0800 Subject: 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 --- app/app.pro | 5 +++++ app/main.cpp | 1 + app/mapviewer.qml | 9 +++++++++ 3 files changed, 15 insertions(+) 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 -- cgit 1.2.3-korg