Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0, 5.13.1
-
None
-
-
8d14f08eaef956dba22fac12c021517d2d811c9c (qt/qtdoc/5.13)
Description
http://doc.qt.io/qt-5/internationalization.html
The below statement is wrong:
> QPainter::drawText(int x, int y, const QString &str) will always draw the string with its left edge at the position specified with the x, y parameters. This will usually give you left aligned strings. Arabic and Hebrew application strings are usually right aligned, so for these languages use the version of drawText() that takes a QRect since this will align in accordance with the language.
None of the QPainter::drawText method signatures that take a QRect actually align text based on the language. I found this statement in Qt 3 docs (https://doc.qt.io/archives/3.3/i18n.html), so I guess it was written long ago and nobody just paid attention this behavior has changed since then. Thanks sharon.woods for finding this.
Update:
I've also checked how it works in Qt 4.8.7. No difference there, Hebrew appears left aligned.