Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.3.1
-
e084fbbe18d771702312d7db65030aaaf18b596b
Description
When a text field contains Arabic text and one inserts numerical characters at the end of the text, the cursor position after typing the first numerical character is wrong, on subsequent numerical character input the cursor position is correct.
Run the following example. It will open a QTextEdit and a QLineEdit. Add a digit to each of them to see two different behaviors.
#include <QtGui> int main(int argc, char **argv) { QApplication app(argc, argv); QLineEdit lineEdit; lineEdit.setText(QString::fromUtf8("الجزيرة نت")); lineEdit.setLayoutDirection(Qt::RightToLeft); lineEdit.show(); QTextEdit textEdit; textEdit.setPlainText(lineEdit.text()); textEdit.setLayoutDirection(Qt::RightToLeft); textEdit.show(); return app.exec(); }