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

Hiding RadioButtonStyle's indicator component also hides the label

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.0
    • 5.1.1
    • Quick: Controls 1
    • None
    • qtquickcontrols/stable: 0345894b1fcc2ae277d077f9eda362ddf2d25a01

    Description

      import QtQuick 2.0
      import QtQuick.Controls 1.0
      import QtQuick.Controls.Styles 1.0
      
      Rectangle {
          id: root
          width: 400
          height: 400
      
          ExclusiveGroup {
              id: styleGroup
          }
          property Component radioButtonStyle: RadioButtonStyle {
              label: Rectangle {
                  color: "darkgrey"
                  implicitWidth: text.implicitWidth
                  implicitHeight: text.implicitHeight
      
                  Text {
                      id: text
                      anchors.fill: parent
                      color: "white"
                      text: control.text
                  }
              }
      
              indicator: null
          }
      
          Row {
              RadioButton {
                  text: "Default"
                  exclusiveGroup: styleGroup
                  checked: true
                  style: radioButtonStyle
              }
              RadioButton {
                  text: "Dark"
                  exclusiveGroup: styleGroup
                  style: radioButtonStyle
              }
              RadioButton {
                  text: "Light"
                  exclusiveGroup: styleGroup
                  style: radioButtonStyle
              }
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes