edifice.CheckBox

class edifice.CheckBox(checked=False, text='', on_change=<function CheckBox.<lambda>>, **kwargs)[source]

Bases: edifice.base_components.QtWidgetComponent

Checkbox widget.

../_images/checkbox_dropdown.png

Checkbox on the left.

A checkbox allows the user to specify some boolean state.

The checked prop determines the initial check-state of the widget. When the user toggles the check state, the on_change callback is called with the new check state.

Parameters
  • checked (bool) – whether or not the checkbox is checked initially

  • text (Any) – text for the label of the checkbox

  • on_change (Callable[[bool], None]) – callback for when the check box state changes. The callback receives the new state of the check box as an argument.

Methods

set_on_change(on_change)

Attributes

children

The children of this component.

props

The props of this component.