RadioButton QML Type | Qt Labs Controls 5.6

Qt 5.6 | Qt Labs Controls | QML Types | RadioButton QML Type

Qt 5.6.2 Reference Documentation

# RadioButton QML Type

A radio button control. More...

Import Statement: | import Qt.labs.controls 1.0
Inherits: | AbstractButton

- List of all members, including inherited members

## Detailed Description

RadioButton presents an option button that can be toggled on (checked) or off (unchecked). Radio buttons are typically used to select one option from a set of options.

| A radio button in its normal state.
| A radio button that is checked.
| A radio button that has active focus.
| A radio button that is disabled.

Radio buttons are auto-exclusive by default. Only one button can be checked at any time amongst radio buttons that belong to the same parent item; checking another button automatically unchecks the previously checked one.

      ColumnLayout {
          RadioButton {
              checked: true
              text: qsTr("First")
          }
          RadioButton {
              text: qsTr("Second")
          }
          RadioButton {
              text: qsTr("Third")
          }
      }

Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.

See also ButtonGroup, Customizing RadioButton, and Button Controls.