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

Controls 1, RadioButton Label vertical alignment different in Qt5.12

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.3
    • Quick: Controls 1
    • None
    • Windows

    Description

      import QtQuick 2.7
      import QtQuick.Controls 1.4
      import QtQuick.Controls.Styles 1.4
      
      ApplicationWindow
      {
          visible: true
          width: 640
          height: 480
      
          ExclusiveGroup { id: foo }
      
          Rectangle
          {
              anchors.fill: parent
              anchors.margins: 16
              
              Column
              {
                  width: parent.width
                  spacing: 4
      
                  Repeater
                  {
                      model: 3
                      RadioButton
                      {
                          width: parent.width
                          text: "button " + index
                          exclusiveGroup: foo
      
                          style: RadioButtonStyle
                          {
                              indicator: Rectangle {
                                  implicitWidth: 32
                                  implicitHeight: 32
                                  radius: 10
                                  border.width: 1
                                  Rectangle
                                  {
                                      anchors.fill: parent
                                      visible: control.checked
                                      color: "#555"
                                      radius: 9
                                      anchors.margins: 4
                                  }
                              }
                              label: Text
                              {
                                  // COMMENT IN THESE LINES TO FIX Q5.12
                                  //height: control.height
                                  //verticalAlignment :  Text.AlignVCenter
      
                                  text: control.text
                                  font.pointSize: 12
                              }
                          }
                      }
                  }
              }
          }
      }
      

      On Qt5.9.6; see pic r59.png attached.
      On Qt5.12.3; see pic r512.png

      Workaround, add in the lines commented out for alignment in 5.12

      Sorry if this bug has already been raised, did'nt see it. Also, it's possible this change is deliberate although i would expect Controls 1 to have been left the same.

      thanks.

      Attachments

        1. r512.png
          r512.png
          3 kB
        2. r59.png
          r59.png
          3 kB
        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
            jkj jkj yuio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes