Important: Please read the Qt Code of Conduct -

TextField onReturnPressed slot raises twice

  • Hi! I am working with this qml element and I have it right like this:

    TextField {
        id: whatever
        placeholderText: "<i>" + "SomeText" + "</i>"
        selectByMouse: true
        layer.enabled: true
        width: parent.width
        anchors.verticalCenter: parent.verticalCenter
        Keys.onLeftPressed: {
            console.log('TextFooter: Left Event');
            event.accepted = false;
        Keys.onReturnPressed: {
            console.log('TextFooter: Return Event');
            event.accepted = false;

    I am receiving the returnPressed twice.

    Does anyone know why?