Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65948

"Internationalization with Qt" article is outdated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.13.2, 5.14.0 Alpha
    • 5.10.0, 5.13.1
    • Documentation
    • None
    • All
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            leenam Leena Miettinen
            wearyinside Oleg Yadrov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes