<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QT 5.9.4 - virtualkeyboard problems]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am struggling with qtvirtualkeyboard on embedded linux device with qt 5.9.4</p>
<p dir="auto">I created a start.qml file which looks as follows:</p>
<pre><code>import QtQuick 2.9
import QtQuick.Window 2.3
import QtQuick.Controls 2.2
import QtQuick.VirtualKeyboard 2.1

ApplicationWindow {
    width: 800
    height: 1280
    flags: Qt.FramelessWindowHint
    visible: true

    Item {
        id: root
        width: 800
        height: 1280
        visible: true

        Item {
            id: appContainer
            anchors.left: parent.left
            anchors.top: parent.top
            anchors.right: parent.right
            anchors.bottom: inputPanel.top

            TextField {
                x: 10
                y: 10
                color: "#192e4c"
                maximumLength: 8
                inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhHiddenText
                focus: true
                onActiveFocusChanged: {
                    if (activeFocus) {
                        Qt.inputMethod.update(Qt.ImQueryInput)
                    }
                }
            }

        }

        InputPanel {
            id: inputPanel
            y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
            anchors.left: parent.left
            anchors.right: parent.right
        }
    }

}
</code></pre>
<p dir="auto">and this works as expected - there is a keyboard with digits only and I can enter digits to the TextField.</p>
<p dir="auto">If I modify my qml as follows and try to use my TextField in stacked qml there is a full keyboard showing on the screen and each key press generates an "input method is not set" message on the terminal. Digits are not entered into TextField.</p>
<pre><code>import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.VirtualKeyboard 2.1

ApplicationWindow {
    width: 800
    height: 1280
    flags: Qt.FramelessWindowHint
    visible: true

    Item {
        id: root
        width: 800
        height: 1280
        visible: true

        Item {
            id: appContainer
            anchors.left: parent.left
            anchors.top: parent.top
            anchors.right: parent.right
            anchors.bottom: inputPanel.top

            StackView {
                id: stack
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.right: parent.right
                anchors.bottom: parent.bottom

                initialItem: "qrc:/test.qml"
            }
        }

        InputPanel {
            id: inputPanel
            y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
            anchors.left: parent.left
            anchors.right: parent.right
        }
    }

}
</code></pre>
<p dir="auto">This is the content of test.qml pushed on stack</p>
<pre><code>import QtQuick 2.9
import QtQuick.Controls 2.2

Item {
    width: 800
    height: 1280

    TextField {
        x: 10
        y: 10
        color: "#192e4c"
        maximumLength: 8
        inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhHiddenText
        focus: true
        onActiveFocusChanged: {
            if (activeFocus) {
                Qt.inputMethod.update(Qt.ImQueryInput)
            }
        }
    }

}
</code></pre>
<p dir="auto">Regards,</p>
<p dir="auto">Michal</p>
]]></description><link>https://forum.qt.io/topic/149540/qt-5-9-4-virtualkeyboard-problems</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 21:24:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/149540.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Sep 2023 12:56:35 GMT</pubDate><ttl>60</ttl></channel></rss>