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

Qt 6.5 Material TextField placeholder breaks with alignment

    XMLWordPrintable

Details

    • Linux/X11
    • 4ab11d03a (dev), 7973b58a1 (6.5.1), 40d39636a (6.5)

    Description

      When using TextField and setting alignment to something other than AlignLeft, the placeholder text is not placed in the correct location

      Attached small project

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls.Material
      import QtQuick.Layouts
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          ColumnLayout{
              anchors.top:parent.top
              anchors.left: parent.left
              anchors.right:parent.right
              anchors.topMargin:10
              spacing:10
              TextField{
                  Layout.fillWidth:true
                  placeholderText:"AlignLeft"
                  horizontalAlignment:Text.AlignLeft
              }
              TextField{
                  Layout.fillWidth:true
                  placeholderText:"AlignHCenter"
                  horizontalAlignment:Text.AlignHCenter
              }
              TextField{
                  Layout.fillWidth:true
                  placeholderText:"AlignRight"
                  horizontalAlignment:Text.AlignRight
              }
          }
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            ihaber Ian Haber
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes