edifice.RadioButton#
- class edifice.RadioButton(checked=False, text='', on_change=None, **kwargs)[source]#
Bases:
QtWidgetElement
Radio buttons.
Underlying Qt Widget QRadioButton
Radio buttons are used to specify a single choice out of many. Radio buttons belonging to the same parent Element are exclusive: only one may be selected at a time.
- Parameters:
checked (
bool
) – Whether or not the RadioButton is checked.text (
str
) – Text for the label of the RadioButton.on_change (
Optional
[Callable
[[bool
],Optional
[Awaitable
[None
]]]]) – Event handler for when the checked value changes, but only when the user checks or unchecks, not when the checked prop changes.
Methods
__init__
([checked, text, on_change])register_ref
(reference)Registers provided
Reference
to this Element.set_key
(key)Sets the key of the Element.
Attributes
children
The children of this Element.
props
The props of this Element.
underlying
The underlying QWidget, which may not exist if this Element has not rendered.