check_box

Module Contents

CheckBoxIcon

CheckBoxIcon

CheckBoxState

Check box state

CheckBox

Check box

class CheckBoxIcon

Bases: qfluentwidgets.common.icon.FluentIconBase, enum.Enum

CheckBoxIcon

ACCEPT = 'Accept'
PARTIAL_ACCEPT = 'PartialAccept'
path(theme=Theme.AUTO)

get the path of icon

Parameters

theme: Theme

the theme of icon * Theme.Light: black icon * Theme.DARK: white icon * Theme.AUTO: icon color depends on config.theme

class CheckBoxState

Bases: enum.Enum

Check box state

NORMAL = 0
HOVER = 1
PRESSED = 2
CHECKED = 3
CHECKED_HOVER = 4
CHECKED_PRESSED = 5
DISABLED = 6
CHECKED_DISABLED = 7
class CheckBox(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QCheckBox

Check box

Constructors

  • CheckBox(parent: QWidget = None)

  • CheckBox(text: str, parent: QWidget = None)

isPressed = False
isHover = False
lightCheckedColor
darkCheckedColor
lightTextColor
darkTextColor
mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
setCheckedColor(light, dark)

set the color of indicator in checked status

Parameters

light, dark: str | QColor | Qt.GlobalColor

indicator color in light/dark theme mode

setTextColor(light, dark)

set the color of text

Parameters

light, dark: str | QColor | Qt.GlobalColor

text color in light/dark theme mode

paintEvent(e)