Skip to content

A QML based on screen virtual keyboard for embedded QML applications

License

Notifications You must be signed in to change notification settings

amarula/cutekeyboard

Repository files navigation

Build License: MIT

CuteKeyboard

CuteKeyboard is a Qt virtual keyboard plugin for embedded applications.

Installation

Download the repository, build and install the plugin.

mkdir build && cd build
qmake ..
make -j4
make install

Custom Installation

mkdir build && cd build
qmake .. INSTALL_PREFIX=/home/custom_dir/custom_root
make -j4
make install

Examples

mkdir build && cd build
qmake .. CONFIG+=BUILD_EXAMPLES
make -j4
make install

Usage

In the main.cpp add the cutekeyboard plugin.

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

In the main.qml insert the keyboard component

import QtQuick.CuteKeyboard 1.0

...

InputPanel {
    id: inputPanel

    z: 99
    y: window.height

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

    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