Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.4.0
-
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
- replaces
-
QTBUG-7516 QPlainTextEdit doesn't align to the right when RightToLeft is set
-
- Open
-
-
QTBUG-6586 Right arrow goes left, left arrow goes right
-
- Closed
-
-
QTBUG-4138 QLineEdit/QTextEdit: When in RtoL mode, then pressing the left cursor arrow causes it to go right and vice versa
-
- Closed
-
-
QTBUG-8897 RTL layout support for Rich text editor
-
- Closed
-