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

Qt needs to handle unfinished preedit text more gracefully

    XMLWordPrintable

Details

    • Task
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • None
    • None
    • None

    Description

      When you type something in a Qt widget using T9, the last word you type will remain in preedit mode (in other words, underlined) unless you explicitly commit by either pressing space or right arrow key. This means that functions returning the widget text typically omit the the last word, because it is preedit text.

      This is a bit unintuitive. Here is the current status if the issue, as well as the things we need to decide on:

      From a programmatic perspective, the behavior is by design. Qt is not supposed to return text that is not finished. For the application it is easy to get around this by combining strings from the widget text and the input method preedit text, however it is tedious and typically needs to be done for every widget, so we should think of something clever here. Maybe a new function that explicitly returns both texts combined.

      There is also the question of what should happen when focus switches. Right now Qt will discard all preedit text in a widget, so the last word will typically be erased if the user moves around, leaving him/her frustrated.

      We need to solve these issues by either being more tolerant when having preedit text (so not deleting or ignoring them), or by committing them more aggressively. The last one could for example be a style hint that tells you what to do with unfinished preedit text.

      Attachments

        Issue Links

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

          Activity

            People

              axisnokia axisnokia (Inactive)
              axisnokia axisnokia (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes