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

TextField size must be explicitly set when customizing the background property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.7.1
    • 5.7.0
    • Quick: Controls 2
    • None
    • c7b8289a706f982c1cf5091a4d86606ec758b05d

      Customizing background of a TextField in a RowLayout minimizes the width of it and no text can be seen.

      Example code (Comment out the background property to get correct result):

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Layouts 1.3
      
      Item {
          width: 400
          height: 100
          RowLayout {
              width: 200
              height: 50
              x: 10
              y: 10
      
              Label {
                  text: 'Username:'
              }
      
              TextField {
                  background: Rectangle {
                      color: 'red'
                  }
              }
          }
      }
      

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

            Unassigned Unassigned
            safa alfulaij Safa Alfulaij
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes