Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QVirtualKeyBoard problem: inputmethod is not set



  • The keyboard is shown, but when you click on TextInput i get message "input method is not set. Maybe someone know this.

    Window {
        id: window
        visible: true
        width: 1024
        height: 768
     color: "lightgreen"
    
    
    
        TextInput
        {
            id: textInput
            text: qsTr("Enter some text...")
            height: parent.height
            width: parent.width
            color: focus ? "red" : "black"
            font.pixelSize: 32
            function setFontSize(newSize)
            {
                font.pixelSize = newSize
                return font.family + " Size=" + newSize
            }
    
        }
    
        InputPanel {
            id: inputPanel
            z: 99
            x: 0
            y: window.height
            //        y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
            //                anchors.left: parent.left
            //                anchors.right: parent.right
            width: window.width
            focus: true
            states: State {
                name: "visible"
                when: inputPanel.active
                PropertyChanges {
                    target: inputPanel
                    y: window.height - inputPanel.height
                }
            }
            transitions: Transition {
                from: ""
                to: "visible"
                reversible: true
                ParallelAnimation {
                    NumberAnimation {
                        properties: "y"
                        duration: 250
                        easing.type: Easing.InOutQuad
                    }
                }
            }
        }
    }
    

Log in to reply