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

Text edit controls ignores LayoutMirroring if horizontalAlignment is not specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.12, 6.4.2
    • Quick: Layouts
    • None

    Description

      According to docs, text edit controls has horizontalAlignment set to AlignLeft by default.

      However, it's still required to specify it explicitly for the LayoutMirroing to work properly with such controls (otherwise text stays aligned to left instead of right when LayoutMirroing.enabled is true).

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Layouts 1.12
      import QtQuick.Controls 2.12
      Window 
      {
          id: root    
          width: 250
          height: 150
          visible: true
          title: qsTr("Hello World")    
          LayoutMirroring.enabled: true
          LayoutMirroring.childrenInherit: true    
          TextField
          {
              anchors.fill: parent
              //TODO: uncomment this line to "fix" the issue
              //horizontalAlignment: TextField.AlignLeft
          } 
      }

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes