xavi-b / QtFreeVirtualKeyboard

A QML based on screen virtual keyboard for embedded QML applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QtFreeVirtualKeyboard

QtFreeVirtualKeyboard is a Qt virtual keyboard plugin for embedded applications.

Installation

Download the repository, build and install the plugin.

git clone https://github.com/xavi-b/QtFreeVirtualKeyboard.git
mkdir build && cd build
qmake ../VirtualKeyboard
make -j4
make install

Usage

In the main.cpp add the freevirtualkeyboard plugin.

qputenv("QT_IM_MODULE", QByteArray("freevirtualkeyboard"));

In the main.qml insert the keyboard component

import QtQuick.FreeVirtualKeyboard 1.0

...

InputPanel {
    id: inputPanel

    z: 99
    y: window.height

    anchors.left: parent.left
    anchors.right: parent.right

    btnTextFontFamily: "monospace"

    states: State {
        name: "visible"
        when: Qt.inputMethod.visible
        PropertyChanges {
            target: inputPanel
            y: window.height - inputPanel.height
        }
    }
    transitions: Transition {
        from: ""
        to: "visible"
        reversible: true
        ParallelAnimation {
            NumberAnimation {
                properties: "y"
                duration: 150
                easing.type: Easing.InOutQuad
            }
        }
    }
}

Authors

License

MIT

About

A QML based on screen virtual keyboard for embedded QML applications

License:MIT License


Languages

Language:QML 56.1%Language:C++ 41.4%Language:QMake 1.9%Language:C 0.6%