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. Qt 5.6 android qml webview handle keyboard: HELP! BUG in WebView:!

Qt 5.6 android qml webview handle keyboard: HELP! BUG in WebView:!

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
webviewandroidinputmethodinput system
3 Posts 2 Posters 2.5k 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.
  • A Offline
    A Offline
    adderly
    wrote on last edited by adderly
    #1

    Hey guys,
    i have a problem with the webview and virtual keyboard (android's).

    I have a fullscreen Webview which loads correctly:

    WebView{
    anchors.fill:parent
    url:"..."
    }
    

    The problem is when i need to handle the size of this webview taking into account if the keyboard have been shown. If it were a normal qml control it would be a simple onFocus handling, but then i focus into a text field in the loaded webpage there is no way for me to know if the keyboard is shown and the size of it.
    I think Qt.inputMethod should be updated even if the event was not triggered a Qt control.
    To put it in a clearer way, i need to know the size of the shown keyboard to handle the webview's size because the keyboard overlaps the webview.

    Please help!

    ----- BUG ------
    The Qt.inputMethod does not recieves changes if the focus is on WebView. Havent tested many cases, but it applies to the problem presented above.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adderly
      wrote on last edited by
      #2

      To solve it for android it was as simple as adding this android:windowSoftInputMode="adjustResize" to the activity property in the AndroidManifest.xml.
      I think Qt for android is highly untested, i have this luck to get the bugs in my face.

      Maybe calling it a bug is incorrect, more like " a hidden feature only encountered by those lost souls called early implementers. "

      Its a bug, in the documentation. :P

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        AFAIK, the QtWebView module is TP so that's the kind of thing that may have slipped through. You should take a look at the bug report system to see if there's already something about it. If not then please consider opening a new report.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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