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

Inconsistent cursor movement when QApplication::layoutDirection()==Qt::RightToLeft

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.4
    • 4.4.0
    • Core: Locales (i18n)
    • None
    • 88bee366f5d3e98ad23931eee866cbad4cf93511

    Description

      The problem is highlighted by the attached sample application. It uses a QTextEdit and a QLineEdit to display the same string (a mix of Arabic and English text). Note that the bug oinly happens while in RTL mode and not in LTR mode.

      The cursor movement is inconsistent while in RTL mode. To observe this click on "Arabic English Arabic2" line edit, press the HOME key and start iterating through the string via Key_Left. Observe the key movement. Now move cursor into text edit, press HOME and start iterating via Key_Left. Note that you cannot use the left key. You have to use the right key.

      Now I am not 100% which directional key is the correct one to use but my understanding from Bidi is that the reading direction for the global context should be used. This would imply that if QApplication::layoutDirection()==Qt::RightToLeft holds true Key_Left should be used. Under this assumption the text edit field uses an incorrect cursor movement.

      Attachments

        Issue Links

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

          Activity

            People

              jiang Jiang Jiang
              alex Alex (closed Nokia identity) (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes