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

loading qt_*.qm for RTL languages don't set layout direction to Qt::RightToLeft

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.0, 5.4.0
    • Fix Version/s: 5.5.0
    • Component/s: Widgets: Layout
    • Labels:
      None
    • Environment:
      Linux, Windows
    • Commits:
      qtbase.git: 49af548abb03743eabb8727ac685e1c290cb2118, qttranslations.git: dc511a947ab16429682e4887f95f94fc8bcb6fd2

      Description

      When an application loads with a right to left language (e.g. Persian, Arabic) it's layout should be switched to Qt::RightToLeft, too.
      There's a translatable string within QApplication class (i.e. tr("QT_LAYOUT_DIRECTION")) responsible for detecting correct layout direction for loaded translation language.

      This works on Qt4 but it doesn't work on Qt5.

      P.S.: The language file qt_*.qm is loaded successfully because when I add the following line to the application it works correctly:

      a.setLayoutDirection(QApplication::tr("QT_LAYOUT_DIRECTION") == QLatin1String("RTL") ? Qt::RightToLeft : Qt::LeftToRight);

      A sample file was attached.

        Attachments

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

          Activity

            People

            Assignee:
            smd Jan Arve
            Reporter:
            srazi S. Razi Alavizadeh
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes