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

Text ordering in Qml Apps do not respect QGuiApplication.layoutDirection as base direction

XMLWordPrintable

      With the following qml:

              Text {
                  text: "مصر yooo مصر yooo."
              }
      

      and cpp:

      app.setLayoutDirection(Qt::LeftToRight);
      

      The rendered output looks like this:

      According to the documentation, the QGuiApplication.layoutDirection can be used to explicitly set base direction for the text (a.k.a. embedding level in BiDi spec). The rendered output acts as if Qt::LayoutDirectionAuto was set. With Qt::LeftToRight, the expected string should be rendered in reverse order and the dot should be on the right side.

      From https://doc.qt.io/qt-6/qt.html#LayoutDirection-enum:

      When LayoutDirectionAuto is used in conjunction with text layouting, it will imply that the text directionality is determined from the content of the string to be layouted.

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

            esabraha Eskil Abrahamsen Blomfeldt
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes