switch_button¶
Module Contents¶
Indicator of switch button |
|
Indicator position |
|
Switch button class |
- class Indicator(parent)¶
Bases:
qfluentwidgets.components.widgets.button.ToolButton
Indicator of switch button
- checkedChanged¶
- sliderX¶
- mouseReleaseEvent(e)¶
toggle checked state when mouse release
- toggle()¶
- setDown(isDown: bool)¶
- setHover(isHover: bool)¶
- paintEvent(e)¶
paint indicator
- getSliderX()¶
- setSliderX(x)¶
- class SwitchButton(parent: PyQt5.QtWidgets.QWidget = None, indicatorPos=IndicatorPosition.LEFT)¶
Bases:
PyQt5.QtWidgets.QWidget
Switch button class
Constructors¶
SwitchButton(parent: QWidget = None)
SwitchButton(text: str = “Off”, parent: QWidget = None, `indicatorPos`=IndicatorPosition.LEFT)
- checkedChanged¶
- spacing¶
- checked¶
- text¶
- onText¶
- offText¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- isChecked()¶
- setChecked(isChecked)¶
set checked state
- toggleChecked()¶
toggle checked state
- getText()¶
- setText(text)¶
- getSpacing()¶
- setSpacing(spacing)¶
- getOnText()¶
- setOnText(text)¶
- getOffText()¶
- setOffText(text)¶