Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Key.onReturnedPressed not emitted in TextArea
Forum Updated to NodeBB v4.3 + New Features

Key.onReturnedPressed not emitted in TextArea

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dicksonleong
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DigitalPioneer
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dicksonleong
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DigitalPioneer
          wrote on last edited by
          #4

          I have no idea, then. Sorry. :(

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chriadam
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved