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

Support for an abstract way to ask QTextEdit to scroll from the current input method

    XMLWordPrintable

Details

    Description

      Use case:
      When you edit a long text on mobile device with limited size of the screen, using input method would hide the current cursor (insert position of the text) in the text by a pop-up window of the input method. In the case, the input method should ask the text editor to scroll to show the current cursor not to be covered by the window.

       
      +-----------------+
      |1 Hello Qt world |
      |2 Hello Qt world |
      |3 Hello Qt world |
      |4 Hello Qt world |
      |5 Hello Qt world |
      |6 HelloIQt world |  <- Inserting cursor is here as I
      +-----------------+
      
      Then, activate an input method with predition window.
      
      +-----------------+
      |1 Hello Qt world |
      |2 Hello Qt world |
      |#################| <- # is a pop-uped window of input method
      |#He Hello Hi His#|
      |#Her How Hook...#|
      |#################|  <- Inserting cursor is not shown. BAD
      +-----------------+
      
      It should be something like this.
      
      +-----------------+
      |6 HelloIQt world | <- Inserting cursor is shown by scrolling. GOOD.
      |7 Hello Qt world |
      |#################|
      |#He Hello Hi His#|
      |#Her How Hook...#|
      |#################|
      +-----------------+
      

      In PCs world, screen size is large enough. So that just exchanging the cursor position on the screen is okay as input method can show any kind of window under the cursor. However, it is not the case in most of mobile devices. Therefore, there should be a solution. One possibility would be avoiding inline editing but it's not ideal way as inline editing is preferable.

      Maybe, expanding InputMethodQuery would be suitable to handle the situation above. Say, passing the position and size of the pop-uped window to the editor. Or, if InputMethodQuery can be expanded for a custom widget and input method, there would be possible for platform specific features.

      Please note that this is a real use case in most of Japanese phones. Thanks in advance.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            uichi TAKAHASHI Uichiro
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes