Radio
- class Radio[source]
Bases:
object
Class representing a radio button group wrapped in a group box.
- Parameters
- app
compas_view2.app.App
The app containing the widget.
- parentQtWidgets.QWidget
The parent widget for the radio button group.
- titlestr
The label for the radio button group.
- itemslist[dict[str, Any]]
A list of radio button group items, with each item defined as a dict with a particular structure. See Notes for more info.
- actioncallable
The action associated with the radio button group.
- app
Notes
Every item dict should have the following structure.
item['text'] # str : The text label of the item. item['value'] # Any : The value of the item, if different from the item text. item['checked'] # bool : If True, the item should be marked as checked.
- Attributes
- radioQtWidgets.QButtonGroup
The button group containing the exclusive radio items.
- actioncallable
The action associated with the click event of the radio button group.
- valuesdict[QtWidgets.QRadioButton, Any]
Mapping between radio buttons and their values.
Methods