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

inputMethodHints does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 6.7.3
    • 6.7.1
    • QPA: Android
    • None
    • Win64, Android Emulator
    • Android
    • 2024wk26s2FOQtforAndroid

    Description

      so all day I am trying to manage to have triggered textChanged() in TextInput{} / TextField{} when user type in something...

      however because it only keeps partial text in preeditText / displayText then its not possible.

      so I tried all google hints to use:

      inputMethodHints (either Qt.ImhNone, Qt.ImhSensitiveData or Qt.ImhNoPredictiveText),

      howevert it has no effect... keyboard still shows me the hints of what i probably want to type by dictionary, and new characters are not accepted as text anyway.

      I tried so many things, like:

      text: displayText

      or:
       

      onPreeditTextChanged:
          if (preeditText.trim().length > text.trim().length) {
              if (preeditText.trim().length === 1) { text = preeditText.trim(); }
              else { text += preeditText.trim().substring(text.length, preeditText.trim().length); }
          }

       
      or same/similar with displayText

      which brings so many issues...

       

      can I kindly ask for the VERY BASIC example how it shall be done? how to (after user types in something) it gets assigned to text and will be accepted and emited to textChanged() ?

      Attachments

        Issue Links

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

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              shokarta Jiri Zaloudek
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes