Key.onReturnedPressed not emitted in TextArea



  • The signal Key.onReturnedPressed doesn't emit when using in a TextArea. It do work on TextField but not TextArea. Is this a bug or normal behavior? I using MeeGo's Qt Quick Component on N9 with PR1.2. The code is like:

    @import QtQuick 1.1
    import com.nokia.meego 1.0

    TextArea{
    anchors.fill: parent
    Keys.onReturnPressed: console.log("Key.onReturnedPressed")
    platformSipAttributes: SipAttributes {
    actionKeyEnabled: true
    actionKeyHighlighted: true
    actionKeyLabel: "RETURN"
    }
    }@

    Any fix/workaround for this?



  • Looks like you need a focus: true on that TextArea so that it receives key events.



  • not that problem, it is already get focus, if not i won't able to type on it using the keyboard



  • I have no idea, then. Sorry. :(



  • Just a quick note: I believe that Return and Enter have different events. It's worth double checking that the EnterPressed event isn't being received instead of ReturnPressed.


Log in to reply
 

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