aqt.switch#
Classes#
A horizontal slider to toggle between two states which can be denoted by strings and/or QIcons. |
Module Contents#
- class aqt.switch.Switch(radius: int = 10, left_label: str = '', right_label: str = '', left_color: dict[str, str] | None = None, right_color: dict[str, str] | None = None, parent: QWidget | None = None)#
Bases:
QAbstractButtonA horizontal slider to toggle between two states which can be denoted by strings and/or QIcons.
The left state is the default and corresponds to isChecked()=False. The suppoorted slots are toggle(), for an animated transition, and setChecked().
- position() int#
- property start_position: int#
- property end_position: int#
- property label: str#
- property path_color: QColor#
- property label_width: int#
- width() int#
- height() int#
- sizeHint() QSize#
- setChecked(checked: bool) None#
- paintEvent(_event: QPaintEvent | None) None#
- mouseReleaseEvent(event: QMouseEvent | None) None#
- enterEvent(event: QEnterEvent | None) None#
- toggle() None#