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

Input widgets/controls ignore ImhFormattedNumbersOnly/ImhDigitsOnly

XMLWordPrintable

    • Windows

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          color: "lightgrey"
      
          TextField { inputMethodHints: Qt.ImhFormattedNumbersOnly }
      }
      

      Run this code on a machine in touchscreen mode.

      • Expected outcome: A numpad keyboard should appear.
      • Actual outcome: A QWERTY keyboard appears.

       
      Notes

      • Android produces a numpad keyboard by default, but Windows 10 does not
      • Widgets also behave the same (tested with QLineEdit with lineEdit.setInputMethodHints(Qt::ImhFormattedNumbersOnly) )
      • Same results when using Qt.ImhDigitsOnly

       

        1. win10-keyboard-qwerty.png
          8 kB
          Sze Howe Koh
        2. win10-keyboard-symbols.png
          10 kB
          Sze Howe Koh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vhilshei Volker Hilsheimer
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes