I'm using QTextEdit to show messages in my app. My problem is that QTextEdit doesn't show messages correctly when I use Latin and Arabic text simultaneously.
Correct order:

Incorrect order:

As you can see, the QTextEdit doesn't show message in correct order.
I've tried to solve the problem using CSS style, but it didn't work.
Thanks guys. I've solved the problem by the following code:
text_option = QTextOption(QtCore.Qt.AlignmentFlag.AlignLeft)text_option.setTextDirection(QtCore.Qt.LayoutDirection.RightToLeft)self.conversationsTextEdit.document().setDefaultTextOption(text_option)