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

Problems of handling Keys events



  • Hello!
    I have main Item, and all windows, dialogs etc are children of it.
    I have added into it two Key listeners:

        Keys.onPressed: {
            console.log("PRESSED");
            if (event.key === Qt.Key_Back) {
                event.accepted = true;
            }
        }
    
        Keys.onReleased: {
            console.log("RELEASED");
            if (event.key === Qt.Key_Back) {
                event.accepted = true;
                mainScreen.backPressed()
            }
        }
    

    They triggers normally, until focus on some TextInput (Android Keyboard is shownig) and then tap back to close keyboard. How can I fix that?


Log in to reply