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

TextField size must be explicitly set when customizing the background property

    XMLWordPrintable

Details

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

    Description

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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes