Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QButtonGroup

A group of radio buttons where only one button can be selected.

since

1.11.1

Hierarchy

  • QButtonGroup

Index

Constructors

constructor

Properties

Readonly buttons

buttons: QRadioButton[]

Retrieve a list of buttons added to this QButtonGroup.

Readonly checkedButton

checkedButton: undefined | QRadioButton

The radio button that is currently selected, if any.

Readonly checkedIndex

checkedIndex: number

ID / index into QButtonGroup.buttons that is currently selected. If no radio button is selected, -1 will be returned.

Readonly idToggled

idToggled: Signal<[index: number, checked: boolean]>

Signal emitted when any radio button in this QButtonGroup is selected or deselected. If the button that causes the signal to be emitted is now selected, checked will be true.

Methods

addItem

  • addItem(text: string, toolTip: undefined | string): QRadioButton
  • Add a radio button to this group with the given text and tooltip.

addItems

  • addItems(values: string[], toolTips: undefined | string[]): QRadioButton[]
  • Add multiple radio buttons to this group.

    Each entry in the values array is the text that will appear on the radio button. The optional list of tooltips specifies the tooltip for the radio buttons at each index.

Generated using TypeDoc