Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android Keyboard window panning
Qt 6.11 is out! See what's new in the release blog

Android Keyboard window panning

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 1 Posters 482 Views
  • 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.
  • bunjee207B Offline
    bunjee207B Offline
    bunjee207
    wrote on last edited by bunjee207
    #1

    Greetings Qt enthusiasts (and ex-trolls),

    Sometimes, when using a TextInput on Android the system pans the view of the application upwards (when the focused TextInput is under the keyboard). That's all fine with me, except I'm having a hard time figuring out what chunk of my application is really visible and its geometry.

    Especially since that panning does not seem to affect the 'y' of my window... I tried a few things with QInputMethod but I'm not entirely sure how to do that.

    Has anyone figured that one out before ?

    1 Reply Last reply
    0
    • bunjee207B Offline
      bunjee207B Offline
      bunjee207
      wrote on last edited by bunjee207
      #2

      Looks like I can do something like this:

      var rectangle = Qt.inputMethod.keyboardRectangle;
      
      var keyboardPanning = rectangle.height - (view.height - rectangle.y);
      
      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