spacr.qt.widgets.toggle

Toggle — QCheckBox styled as an iOS-style switch.

Module Contents

class spacr.qt.widgets.toggle.Toggle(text: str = '', parent=None)[source]

Bases: PySide6.QtWidgets.QCheckBox

A modern toggle switch. Emits stateChanged on user interaction.

sizeHint() QSize[source]

Return the default checkbox hint widened to fit the switch track.

paintEvent(event)[source]

Paint the switch track, knob, and (optional) trailing label.

knobPos[source]