Showing the software keyboard



  • Hi,

    I have the following code inside a rectangle... everything is drawn correctly, but the software keyboard doesn't come out after the text is cleared in onClicked.

    I get the following error from the application output:
    W/Qt (10113): qrc:/recordingView.qml:34 ((null)): qrc:/recordingView.qml:34: TypeError: Property 'openSoftwareInputPanel' of object QQuickTextInput(0x766539a0) is not a function

    @ TextInput {
    id: textInput
    text: "Type word here"
    activeFocusOnPress: false
    font.pointSize: 20
    anchors.centerIn: parent

            MouseArea {
                anchors.fill: parent
                onClicked: {
                    textInput.text = ""
                    if (!textInput.activeFocus) {
                        textInput.forceActiveFocus();
    
                        textInput.openSoftwareInputPanel();
                    } else {
                        textInput.focus = false;
                    }
                }
                onPressAndHold: textInput.closeSoftwareInputPanel();
            }
        }@
    

    How can I get the keyboard to come out and play?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.