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

Text edit controls ignores LayoutMirroring if horizontalAlignment is not specified

XMLWordPrintable

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

      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
          } 
      }

        For Gerrit Dashboard: QTBUG-110085
        # Subject Branch Project Status CR V

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

              Created:
              Updated:

                There is 1 open Gerrit change