A RadioButton is used in a list of items where only one item can be selected at a time. More...
A radio button element consists of a radio button and a line of text. Only one item in a list may be selected at a time. Once an item is selected, it can be deselected only by selecting another item. Initial item selection may be set at the list creation. If not set, the list is shown without a selection.
The following code creates a RadioButton list with three items in it. The platformExclusiveGroup property of all the radio buttons is 'group1' which is a CheckableGroup. This enforces that only one of the radio buttons can be selected at a time. Furthermore the item with the text '1' has the focus and the item with the text '2' is checked.
CheckableGroup { id: group1 } Row { RadioButton { id: button1 text: "1" platformExclusiveGroup: group1 focus: true } RadioButton { id: button2 text: "2" platformExclusiveGroup: group1 checked: true } RadioButton { id: button3 text: "3" platformExclusiveGroup: group1 } }
If a button is checked, checked is true. Otherwise it is false.
See also Checkable.
Deprecated. Use platformExclusiveGroup instead.
Symbian:
The exclusive group that this radio button belongs to. In an exclusive group, only one of the radio buttons can be selected at a time.
See also CheckableGroup.