msl.qt.widgets.checkbox module

A QCheckBox with more options in the constructor.

class msl.qt.widgets.checkbox.CheckBox(*, checkable=True, initial=False, state_changed=None, text=None, tooltip=None, parent=None)[source]

Bases: QCheckBox

A QCheckBox with more options in the constructor.

Parameters:
  • checkable (bool, optional) – Whether the checkbox can be (un)checked.

  • initial (bool or Qt.CheckState, optional) – The initial state of the checkbox.

  • state_changed – A callable function to use as a slot for the stateChanged() signal.

  • text (str, optional) – The text to display next to the checkbox.

  • tooltip (str, optional) – The tooltip to display for the checkbox.

  • parent (QWidget, optional) – The parent widget.