Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141178

Windows 11 onscreen keyboard detection not working reliably with Qt.inputMethod

XMLWordPrintable

    • Windows

      See attached test project. I need this to add bottomMargin to my Flickable so that the TextFields are not hidden when the onscreen keyboard appears.

      Only some evens are working:

      • onInputItemClipRectangleChanged
      • onCursorRectangleChanged
      • onAnchorRectangleChanged

      All others do not work like visible. The 3 events from above only fire when the Windows onscreen keyboard gets visible, but never when it is getting closed.

          Connections {
              target: Qt.inputMethod        
             function onAnchorRectangleChanged() {
                  print("onAnchorRectangleChanged", Qt.inputMethod.anchorRectangle);
              }        function onAnimatingChanged() {
                  print("onAnimatingChanged - keyboard animating:", Qt.inputMethod.isAnimating);
              }        function onCursorRectangleChanged() {
                  print("onCursorRectangleChanged", Qt.inputMethod.cursorRectangle);
              }        function onInputItemClipRectangleChanged() {
                  print("onInputItemClipRectangleChanged", Qt.inputMethod.inputItemClipRectangle);
              }        function onKeyboardRectangleChanged() {
                  print("onKeyboardRectangleChanged - KEYBOARD:", Qt.inputMethod.keyboardRectangle);
                  root.checkKeyboardActivity()
              }        function onVisibleChanged() {
                  print("onVisibleChanged - keyboard visible:", Qt.inputMethod.visible);
                  root.checkKeyboardActivity()
              }
          }
       

       

      
      qml: onInputItemClipRectangleChanged QRectF(0, 0, 1366, 768)
      qml: onInputItemClipRectangleChanged QRectF(0, 0, 1366, 768)
      qml: onCursorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onAnchorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onInputItemClipRectangleChanged QRectF(20, 140, 1326, 56)
      qml: onCursorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onAnchorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onCursorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onAnchorRectangleChanged QRectF(36, 160, 1, 16)
      qml: onInputItemClipRectangleChanged QRectF(20, 140, 1326, 56)
      qml: onInputItemClipRectangleChanged QRectF(20, 140, 1326, 56)
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            srutledg Shawn Rutledge
            kelteseth Elias Steurer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes