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. Enter key on Android Keyboard
Forum Updated to NodeBB v4.3 + New Features

Enter key on Android Keyboard

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 452 Views 2 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.
  • M Offline
    M Offline
    Michel de Boer
    wrote on last edited by
    #1

    I have a QML TextInput field in my Android app where the user can type a search query. The Android virtual keyboard shows nicely and I can enter text.

    However then Enter key on the keyboard shows "Next".

    How can I change this to a search icon?

    Also when I press the Enter key it does not seem to generate any event.

    How can I get the event of the using pressing the Enter key on Android?

    I have seen this question several times and it seems it is not possible in Qt/QML. I really hope this is not true, otherwise Qt/QML is not very suitable to develop an Android app.

    1 Reply Last reply
    1
    • Y Offline
      Y Offline
      Yunag
      wrote on last edited by
      #2

      To anyone who is also stuck on this problem. Here is the proper solution: EnterKey.

      TextField {
           ...
           EnterKey.type: Qt.EnterKeySearch
           ...
      } 
      
      1 Reply Last reply
      1
      • M Offline
        M Offline
        Michel de Boer
        wrote on last edited by
        #3

        Cool. Is that new in Qt6.8?
        So that will change the button to a search button. How will I get the event from the button press?
        In Qt6.6.3 I tried using Keys.onReleased and then check for the Qt.Key_Return event. That does work on Linux, but not on Android.

        1 Reply Last reply
        0
        • M Michel de Boer has marked this topic as solved on

        • Login

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