PDA

View Full Version : cursor position in QPlainTextEdit with right-to-left layout direction



roxton
24th August 2013, 10:57
Hello! I try to set up a proper right-to-left text handling in QPlainTextEdit.The first my step was to set document()->setDefaultTextOption (QTextOption (Qt::AlignRight)) to see the lines aligned properly.
When I type the text with right-to-left mode, all seems alright except the visual blinking cursor position. When I press the Space key, the cursor visually moves to the first right position of the line. Typing again - characters are added normally to the end of line (from the left).
If I don't use setDefaultTextOption (QTextOption (Qt::AlignRight)), cursors works fine, but I don't have the natural for right-to-left mode paragraphs alignment (by the right side).