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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes