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

A float value padding causes display issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 6.0.4
    • 5.8.0, 5.15.6, 5.15.2
    • Quick: Controls 2
    • None

    Description

      By having a leftPadding of 4.5 prevent the TextField cursor to be shown

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      import QtQuick.Templates 2.0 as T
      import QtQuick.Layouts 1.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          T.TextField {
              clip: true
              leftPadding: 4.5
              width: 100
              height: 30
              verticalAlignment: Qt.AlignVCenter
      
              background: Rectangle {
                  border.width: 1
                  border.color: "red"
              }
          }
      }
      

      The same happen with

          ComboBox {
              leftPadding: 4.5
              contentItem: TextInput {
                  leftPadding: 0
                  clip: true
              }
          }
      

      Attachments

        Issue Links

          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
              cuke Filippo Cucchetto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes