Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11042 Add right-to-left locale support to QtQuick elements
  3. QTBUG-17280

Create LayoutMirroring attached properties for controlling Qt Quick application layout mirroring

    XMLWordPrintable

Details

    • 2c7cab4172f1acc86fd49345a2847417e162f2c3

    Description

      Provide an attached property-based API for setting the layout direction for QML elements.

      LayoutMirroring.enabled is used for mirroring the element layouts. LayoutMirroring.childrenInherit is used for determining whether the mirroring will be inherited by the children elements.

      If no attached property has been defined, no mirroring is done, and left will continue to mean left, and right will continue to mean right.

      You can specify layout direction for a particular Item

      Item {
          LayoutMirroring.enabled: true
          anchors.left: parent.left // actually mirrored to right
          Row { // flows from left to right
              ...
          }
      }
      

      or make all children elements also inherit the layout direction

      Item {
          LayoutMirroring.enabled: true
          LayoutMirroring.childrenInherit: true
          anchors.left: parent.left // actually mirrored to right
          Row { // flows from right to left
              ...
          }
      }
      

      Attachments

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

        Activity

          People

            jpetrell Joona Petrell
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes