components

Package Contents

ColorDialog

Color dialog

Dialog

Dialog box

MessageBox

Message box

FolderListDialog

Folder list dialog box

MessageDialog

Win10 style message dialog box with a mask

MessageBoxBase

Message box base

MaskDialogBase

Dialog box base class with a mask

ExpandLayout

Expand layout

FlowLayout

Flow layout

AdaptiveFlowLayout

Flow layout

VBoxLayout

Vertical box layout

SettingCard

Setting card

SwitchSettingCard

Setting card with switch button

RangeSettingCard

Setting card with a slider

PushSettingCard

Setting card with a push button

ColorSettingCard

Setting card with color picker

HyperlinkCard

Hyperlink card

PrimaryPushSettingCard

Push setting card with primary color

ColorPickerButton

Color picker button

ComboBoxSettingCard

Setting card with a combo box

ExpandSettingCard

Expandable setting card

ExpandGroupSettingCard

Expand group setting card

SimpleExpandGroupSettingCard

Simple expand group setting card

FolderListSettingCard

Folder list setting card

OptionsSettingCard

setting card with a group of options

CustomColorSettingCard

Custom color setting card

SettingCardGroup

Setting card group

DropDownPushButton

Drop down push button

DropDownToolButton

Drop down tool button

PrimaryPushButton

Primary color push button

PushButton

Push button

RadioButton

Radio button

HyperlinkButton

Hyperlink button

ToolButton

Tool button

TransparentToolButton

Transparent background tool button

ToggleButton

Toggle push button

SplitWidgetBase

Split widget base class

SplitPushButton

Split push button

SplitToolButton

Split tool button

PrimaryToolButton

Primary color tool button

PrimarySplitPushButton

Primary split push button

PrimarySplitToolButton

Primary split push button

PrimaryDropDownPushButton

Primary color drop down push button

PrimaryDropDownToolButton

Primary drop down tool button

ToggleToolButton

Toggle tool button

TransparentPushButton

Transparent push button

TransparentTogglePushButton

Transparent toggle push button

TransparentToggleToolButton

Transparent toggle tool button

TransparentDropDownPushButton

Transparent drop down push button

TransparentDropDownToolButton

Transparent drop down tool button

PillPushButton

Pill push button

PillToolButton

Pill push button

CardWidget

Card widget

ElevatedCardWidget

Card widget with shadow effect

SimpleCardWidget

Simple card widget

HeaderCardWidget

Header card widget

CardGroupWidget

GroupHeaderCardWidget

Group header card widget

CheckBox

Check box

ComboBox

Combo box

EditableComboBox

Editable combo box

ModelComboBox

Combo box build in data model

EditableModelComboBox

Editable combo box build in data model

CommandBar

Command bar

CommandButton

Command button

CommandBarView

Command bar view

FlipView

Flip view

HorizontalFlipView

Horizontal flip view

VerticalFlipView

Vertical flip view

FlipImageDelegate

Flip view image delegate

LineEdit

Line edit

TextEdit

Text edit

PlainTextEdit

Plain text edit

LineEditButton

Line edit button

SearchLineEdit

Search line edit

PasswordLineEdit

Password line edit

TextBrowser

Text browser

IconWidget

Icon widget

PixmapLabel

Label for high dpi pixmap

CaptionLabel

Caption text label

StrongBodyLabel

Strong body text label

BodyLabel

Body text label

SubtitleLabel

Subtitle text label

TitleLabel

Sub title text label

LargeTitleLabel

Large title text label

DisplayLabel

Display text label

FluentLabelBase

Fluent label base class

ImageLabel

Image label

AvatarWidget

Avatar widget

HyperlinkLabel

Hyperlink label

ListWidget

List widget

ListView

List view

ListItemDelegate

List item delegate

DWMMenu

A menu with DWM shadow

LineEditMenu

Line edit menu

RoundMenu

Round corner menu

MenuAnimationManager

Menu animation manager

MenuAnimationType

Menu animation type

IndicatorMenuItemDelegate

Menu item delegate with indicator

MenuItemDelegate

Menu item delegate

ShortcutMenuItemDelegate

Shortcut key menu item delegate

CheckableMenu

Checkable menu

MenuIndicatorType

Menu indicator type

SystemTrayMenu

System tray menu

CheckableSystemTrayMenu

Checkable system tray menu

InfoBar

Information bar

InfoBarIcon

Info bar icon

InfoBarPosition

Info bar position

InfoBarManager

Info bar manager

InfoBadge

Information badge

InfoLevel

Info level

DotInfoBadge

Dot info badge

IconInfoBadge

Icon icon badge

InfoBadgePosition

Info badge position

InfoBadgeManager

Info badge manager

SingleDirectionScrollArea

Single direction scroll area

SmoothMode

Smooth mode

SmoothScrollArea

Smooth scroll area

ScrollArea

Smooth scroll area

Slider

A slider can be clicked

HollowHandleStyle

Hollow handle style

ClickableSlider

A slider can be clicked

SpinBox

Spin box

DoubleSpinBox

Double spin box

DateEdit

Date edit

DateTimeEdit

Date time edit

TimeEdit

Time edit

CompactSpinBox

Compact spin box

CompactDoubleSpinBox

Compact double spin box

CompactDateEdit

Compact date edit

CompactDateTimeEdit

Compact date time edit

CompactTimeEdit

Compact time edit

PopUpAniStackedWidget

Stacked widget with pop up animation

OpacityAniStackedWidget

Stacked widget with fade in and fade out animation

TransitionStackedWidget

EntranceTransitionStackedWidget

DrillInTransitionStackedWidget

StateToolTip

State tooltip

SwitchButton

Switch button class

IndicatorPosition

Indicator position

TableView

Table view

TableWidget

Table widget

TableItemDelegate

ToolTip

Tool tip

ToolTipFilter

Tool tip filter

ToolTipPosition

Info bar position

TreeWidget

Tree widget

TreeView

Tree view

TreeItemDelegate

Tree item delegate

CycleListWidget

Cycle list widget

IndeterminateProgressBar

Indeterminate progress bar

ProgressBar

ProgressRing

Progress ring

IndeterminateProgressRing

Indeterminate progress ring

ScrollBar

Fluent scroll bar

SmoothScrollBar

Smooth scroll bar

SmoothScrollDelegate

Smooth scroll delegate

ScrollBarHandleDisplayMode

Scroll bar handle display mode

TeachingTip

Teaching tip

TeachingTipTailPosition

Teaching tip tail position

TeachingTipView

Teaching tip view

PopupTeachingTip

Pop up teaching tip

FlyoutView

Flyout view

FlyoutViewBase

Flyout view base class

Flyout

Flyout

FlyoutAnimationType

Flyout animation type

FlyoutAnimationManager

Flyout animation manager

TabBar

Tab bar

TabItem

Tab item

TabCloseButtonDisplayMode

Tab close button display mode

TabWidget

PipsPager

Pips pager

VerticalPipsPager

Vertical pips pager

HorizontalPipsPager

Horizontal pips pager

PipsScrollButtonDisplayMode

Pips pager scroll button display mode

HorizontalSeparator

Horizontal separator

VerticalSeparator

Vertical separator

NavigationWidget

Navigation widget

NavigationPushButton

Navigation push button

NavigationSeparator

Navigation Separator

NavigationToolButton

Navigation tool button

NavigationTreeWidget

Navigation tree widget

NavigationTreeWidgetBase

Navigation tree widget base class

NavigationAvatarWidget

Avatar widget

NavigationItemHeader

Navigation item header for grouping items

NavigationUserCard

Navigation user card widget

NavigationPanel

Navigation panel

NavigationItemPosition

Navigation item position

NavigationDisplayMode

Navigation display mode

NavigationInterface

Navigation interface

NavigationBarPushButton

Navigation bar push button

NavigationBar

Pivot

Pivot

PivotItem

Pivot item

SegmentedItem

Segmented item

SegmentedWidget

Segmented widget

SegmentedToolItem

Pivot item

SegmentedToolWidget

Segmented tool widget

SegmentedToggleToolItem

Transparent background tool button

SegmentedToggleToolWidget

Segmented toggle tool widget

BreadcrumbBar

Breadcrumb bar

BreadcrumbItem

Breadcrumb item

CalendarPicker

Calendar picker

FastCalendarPicker

Pro calendar picker

DatePickerBase

Date picker base class

DatePicker

Date picker

ZhDatePicker

Chinese date picker

PickerBase

Picker base class

PickerPanel

picker panel

PickerColumnFormatter

Picker column formatter

TimePicker

24 hours time picker

AMTimePicker

AM/PM time picker

class ColorDialog(color, title: str, parent=None, enableAlpha=False)

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase

Color dialog

colorChanged
enableAlpha = False
oldColor
color
scrollArea
scrollWidget
buttonGroup
yesButton
cancelButton
titleLabel
huePanel
newColorCard
oldColorCard
brightSlider
editLabel
redLabel
blueLabel
greenLabel
opacityLabel
hexLineEdit
redLineEdit
greenLineEdit
blueLineEdit
opacityLineEdit
vBoxLayout
setColor(color, movePicker=True)

set color

updateStyle()

update style sheet

showEvent(e)

fade in

class Dialog(title: str, content: str, parent=None)

Bases: qframelesswindow.FramelessDialog, Ui_MessageBox

Dialog box

yesSignal
cancelSignal
windowTitleLabel
setTitleBarVisible(isVisible: bool)
class MessageBox(title: str, content: str, parent=None)

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase, Ui_MessageBox

Message box

yesSignal
cancelSignal
eventFilter(obj, e: PyQt5.QtCore.QEvent)
class FolderListDialog(folderPaths: list, title: str, content: str, parent)

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase

Folder list dialog box

folderChanged
title
content
folderPaths
vBoxLayout
titleLabel
contentLabel
scrollArea
scrollWidget
completeButton
addFolderCard
folderCards
class MessageDialog(title: str, content: str, parent)

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase

Win10 style message dialog box with a mask

yesSignal
cancelSignal
content
titleLabel
contentLabel
yesButton
cancelButton
class MessageBoxBase(parent=None)

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase

Message box base

buttonGroup
yesButton
cancelButton
vBoxLayout
viewLayout
buttonLayout
validate() bool

validate the data of form before closing dialog

Returns

isValid: bool

whether the data of form is legal

hideYesButton()
hideCancelButton()
class MaskDialogBase(parent=None)

Bases: PyQt5.QtWidgets.QDialog

Dialog box base class with a mask

windowMask
widget
setShadowEffect(blurRadius=60, offset=(0, 10), color=QColor(0, 0, 0, 100))

add shadow to dialog

setMaskColor(color: PyQt5.QtGui.QColor)

set the color of mask

showEvent(e)

fade in

done(code)

fade out

isClosableOnMaskClicked()
setClosableOnMaskClicked(isClosable: bool)
setDraggable(draggable: bool)
isDraggable() bool
resizeEvent(e)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
class ExpandLayout(parent=None)

Bases: PyQt5.QtWidgets.QLayout

Expand layout

addWidget(widget: PyQt5.QtWidgets.QWidget)
addItem(item)
count()
itemAt(index)
takeAt(index)
expandingDirections()
hasHeightForWidth()
heightForWidth(width)

get the minimal height according to width

setGeometry(rect)
sizeHint()
minimumSize()
eventFilter(obj, e)
class FlowLayout(parent=None, needAni=False, isTight=False)

Bases: PyQt5.QtWidgets.QLayout

Flow layout

duration = 300
ease
needAni = False
isTight = False
addItem(item)
insertItem(index, item)
addWidget(w)
insertWidget(index, w)
setAnimation(duration, ease=QEasingCurve.Linear)

set the moving animation

Parameters

duration: int

the duration of animation in milliseconds

ease: QEasingCurve

the easing curve of animation

count()
itemAt(index: int)
takeAt(index: int)
removeWidget(widget)
removeAllWidgets()

remove all widgets from layout

takeAllWidgets()

remove all widgets from layout and delete them

expandingDirections()
hasHeightForWidth()
heightForWidth(width: int)

get the minimal height according to width

setGeometry(rect: PyQt5.QtCore.QRect)
sizeHint()
minimumSize()
setVerticalSpacing(spacing: int)

set vertical spacing between widgets

verticalSpacing()

get vertical spacing between widgets

setHorizontalSpacing(spacing: int)

set horizontal spacing between widgets

horizontalSpacing()

get horizontal spacing between widgets

eventFilter(obj: PyQt5.QtCore.QObject, event: PyQt5.QtCore.QEvent) bool
class AdaptiveFlowLayout(parent=None, needAni=False, isTight=False)

Bases: FlowLayout

Flow layout

setWidgetMinimumWidth(width: int)
widgetMinimumWidth()
setWidgetMaximumWidth(width)
widgetMaximumWidth()
class VBoxLayout(parent)

Bases: PyQt5.QtWidgets.QVBoxLayout

Vertical box layout

widgets = []
addWidgets(widgets: List[PyQt5.QtWidgets.QWidget], stretch=0, alignment=Qt.AlignTop)

add widgets to layout

addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, alignment=Qt.AlignTop)

add widget to layout

removeWidget(widget: PyQt5.QtWidgets.QWidget)

remove widget from layout but not delete it

deleteWidget(widget: PyQt5.QtWidgets.QWidget)

remove widget from layout and delete it

removeAllWidget()

remove all widgets from layout

class SettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)

Bases: PyQt5.QtWidgets.QFrame

Setting card

iconLabel
titleLabel
contentLabel
hBoxLayout
vBoxLayout
setTitle(title: str)

set the title of card

setContent(content: str)

set the content of card

setValue(value)

set the value of config item

setIconSize(width: int, height: int)

set the icon fixed size

paintEvent(e)
class SwitchSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, configItem: qfluentwidgets.common.config.ConfigItem = None, parent=None)

Bases: SettingCard

Setting card with switch button

checkedChanged
configItem = None
switchButton
setValue(isChecked: bool)

set the value of config item

setChecked(isChecked: bool)
isChecked()
class RangeSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)

Bases: SettingCard

Setting card with a slider

valueChanged
configItem
slider
valueLabel
setValue(value)

set the value of config item

class PushSettingCard(text, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)

Bases: SettingCard

Setting card with a push button

clicked
button
class ColorSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title: str, content: str = None, parent=None, enableAlpha=False)

Bases: SettingCard

Setting card with color picker

colorChanged
configItem
colorPicker
setValue(color: PyQt5.QtGui.QColor)

set the value of config item

class HyperlinkCard(url, text, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)

Bases: SettingCard

Hyperlink card

linkButton
class PrimaryPushSettingCard(text, icon, title, content=None, parent=None)

Bases: PushSettingCard

Push setting card with primary color

class ColorPickerButton(color: PyQt5.QtGui.QColor, title: str, parent=None, enableAlpha=False)

Bases: PyQt5.QtWidgets.QToolButton

Color picker button

colorChanged
title
enableAlpha = False
setColor(color)

set color

paintEvent(e)
class ComboBoxSettingCard(configItem: qfluentwidgets.common.config.OptionsConfigItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, texts=None, parent=None)

Bases: SettingCard

Setting card with a combo box

configItem
comboBox
optionToText
setValue(value)

set the value of config item

class ExpandSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)

Bases: PyQt5.QtWidgets.QScrollArea

Expandable setting card

isExpand = False
scrollWidget
view
card
scrollLayout
viewLayout
spaceWidget
borderWidget
expandAni
addWidget(widget: PyQt5.QtWidgets.QWidget)

add widget to tail

wheelEvent(e)
setExpand(isExpand: bool)

set the expand status of card

toggleExpand()

toggle expand status

resizeEvent(e)
setValue(value)

set the value of config item

class ExpandGroupSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)

Bases: ExpandSettingCard

Expand group setting card

widgets: List[PyQt5.QtWidgets.QWidget] = []
addGroupWidget(widget: PyQt5.QtWidgets.QWidget)

add widget to group

addGroup(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) GroupWidget

add group

Parameters

icon: str | QIcon | FluentIconBase

the icon of group

title: str

the title of group

content: str

the description of group

widget: str

the widget of group

stretch: int

the stretch of widget

removeGroupWidget(widget: PyQt5.QtWidgets.QWidget)

remove a group from card

class SimpleExpandGroupSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)

Bases: ExpandGroupSettingCard

Simple expand group setting card

class FolderListSettingCard(configItem: qfluentwidgets.common.config.ConfigItem, title: str, content: str = None, directory='./', parent=None)

Bases: qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard

Folder list setting card

folderChanged
configItem
addFolderButton
folders: List[str]
class OptionsSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, texts=None, parent=None)

Bases: qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard

setting card with a group of options

optionChanged
texts = []
configItem
configName
choiceLabel
buttonGroup
setValue(value)

select button according to the value

class CustomColorSettingCard(configItem: qfluentwidgets.common.config.ColorConfigItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title: str, content=None, parent=None, enableAlpha=False)

Bases: qfluentwidgets.components.settings.expand_setting_card.ExpandGroupSettingCard

Custom color setting card

colorChanged
enableAlpha = False
configItem
defaultColor
customColor
choiceLabel
radioWidget
radioLayout
defaultRadioButton
customRadioButton
buttonGroup
customColorWidget
customColorLayout
customLabel
chooseColorButton
class SettingCardGroup(title: str, parent=None)

Bases: PyQt5.QtWidgets.QWidget

Setting card group

titleLabel
vBoxLayout
cardLayout
addSettingCard(card: PyQt5.QtWidgets.QWidget)

add setting card to group

addSettingCards(cards: List[PyQt5.QtWidgets.QWidget])

add setting cards to group

adjustSize()
class DropDownPushButton(*args, **kwargs)

Bases: DropDownButtonBase, PushButton

Drop down push button

Constructors

  • DropDownPushButton(parent: QWidget = None)

  • DropDownPushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • DropDownPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

mouseReleaseEvent(e)
paintEvent(e)
class DropDownToolButton(*args, **kwargs)

Bases: DropDownButtonBase, ToolButton

Drop down tool button

Constructors

  • DropDownToolButton(parent: QWidget = None)

  • DropDownToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

mouseReleaseEvent(e)
paintEvent(e)
class PrimaryPushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PushButton

Primary color push button

Constructors

  • PrimaryPushButton(parent: QWidget = None)

  • PrimaryPushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

  • PrimaryPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

class PushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QPushButton

Push button

Constructors

  • PushButton(parent: QWidget = None)

  • PushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

  • PushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

isPressed = False
isHover = False
setIcon(icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase)
icon()
setProperty(name: str, value) bool
mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
paintEvent(e)
class RadioButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QRadioButton

Radio button

Constructors

  • RadioButton(parent: QWidget = None)

  • RadioButton(url: text, text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

lightIndicatorColor
darkIndicatorColor
indicatorPos
isHover = False
enterEvent(e)
leaveEvent(e)
paintEvent(e)
textColor()
getLightTextColor() PyQt5.QtGui.QColor
getDarkTextColor() PyQt5.QtGui.QColor
setLightTextColor(color: PyQt5.QtGui.QColor)
setDarkTextColor(color: PyQt5.QtGui.QColor)
setIndicatorColor(light, dark)
setTextColor(light, dark)
lightTextColor
darkTextColor
class HyperlinkButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PushButton

Hyperlink button

Constructors

  • HyperlinkButton(parent: QWidget = None)

  • HyperlinkButton(url: str, text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

  • HyperlinkButton(icon: QIcon | FluentIconBase, url: str, text: str, parent: QWidget = None)

getUrl()
setUrl(url: str | PyQt5.QtCore.QUrl)
url
class ToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QToolButton

Tool button

Constructors

  • ToolButton(parent: QWidget = None)

  • ToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

isPressed = False
isHover = False
setIcon(icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase)
icon()
setProperty(name: str, value) bool
mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
paintEvent(e)
class TransparentToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ToolButton

Transparent background tool button

Constructors

  • TransparentToolButton(parent: QWidget = None)

  • TransparentToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class ToggleButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PushButton

Toggle push button

Constructors

  • ToggleButton(parent: QWidget = None)

  • ToggleButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

  • ToggleButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

class SplitWidgetBase(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Split widget base class

dropDownClicked
flyout: PyQt5.QtWidgets.QWidget = None
dropButton
hBoxLayout
setWidget(widget: PyQt5.QtWidgets.QWidget)

set the widget on left side

setDropButton(button)

set drop dow button

setDropIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)

set the icon of drop down button

setDropIconSize(size: PyQt5.QtCore.QSize)

set the icon size of drop down button

setFlyout(flyout)

set the widget pops up when drop down button is clicked

Parameters

flyout: QWidget

the widget pops up when drop down button is clicked. It should contain exec(pos: QPoint) method

showFlyout()

show flyout

class SplitPushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: SplitWidgetBase

Split push button

Constructors

  • SplitPushButton(parent: QWidget = None)

  • SplitPushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

clicked
button
text()
setText(text: str)
icon()
setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)
setIconSize(size: PyQt5.QtCore.QSize)
text_
icon_
class SplitToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: SplitWidgetBase

Split tool button

Constructors

  • SplitToolButton(parent: QWidget = None)

  • SplitToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

clicked
button
icon()
setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)
setIconSize(size: PyQt5.QtCore.QSize)
icon_
class PrimaryToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ToolButton

Primary color tool button

Constructors

  • PrimaryToolButton(parent: QWidget = None)

  • PrimaryToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class PrimarySplitPushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: SplitPushButton

Primary split push button

Constructors

  • PrimarySplitPushButton(parent: QWidget = None)

  • PrimarySplitPushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • PrimarySplitPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

class PrimarySplitToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: SplitToolButton

Primary split push button

Constructors

  • PrimarySplitToolButton(parent: QWidget = None)

  • PrimarySplitToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class PrimaryDropDownPushButton(*args, **kwargs)

Bases: PrimaryDropDownButtonBase, PrimaryPushButton

Primary color drop down push button

Constructors

  • PrimaryDropDownPushButton(parent: QWidget = None)

  • PrimaryDropDownPushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • PrimaryDropDownPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

mouseReleaseEvent(e)
paintEvent(e)
class PrimaryDropDownToolButton(*args, **kwargs)

Bases: PrimaryDropDownButtonBase, PrimaryToolButton

Primary drop down tool button

Constructors

  • PrimaryDropDownToolButton(parent: QWidget = None)

  • PrimaryDropDownToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

mouseReleaseEvent(e)
paintEvent(e)
TogglePushButton
class ToggleToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ToolButton

Toggle tool button

Constructors

  • ToggleToolButton(parent: QWidget = None)

  • ToggleToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class TransparentPushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PushButton

Transparent push button

Constructors

  • TransparentPushButton(parent: QWidget = None)

  • TransparentPushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)

  • TransparentPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

class TransparentTogglePushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: TogglePushButton

Transparent toggle push button

Constructors

  • TransparentTogglePushButton(parent: QWidget = None)

  • TransparentTogglePushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • TransparentTogglePushButton(icon: QIcon | FluentIconBase, text: str, parent: QWidget = None)

class TransparentToggleToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ToggleToolButton

Transparent toggle tool button

Constructors

  • TransparentToggleToolButton(parent: QWidget = None)

  • TransparentToggleToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class TransparentDropDownPushButton(*args, **kwargs)

Bases: DropDownPushButton

Transparent drop down push button

Constructors

  • TransparentDropDownPushButton(parent: QWidget = None)

  • TransparentDropDownPushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • TransparentDropDownPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

class TransparentDropDownToolButton(*args, **kwargs)

Bases: DropDownToolButton

Transparent drop down tool button

Constructors

  • TransparentDropDownToolButton(parent: QWidget = None)

  • TransparentDropDownToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

class PillPushButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: TogglePushButton, PillButtonBase

Pill push button

Constructors

  • PillPushButton(parent: QWidget = None)

  • PillPushButton(text: str, parent: QWidget = None,

    icon: QIcon | str | FluentIconBase = None)

  • PillPushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)

paintEvent(e)
class PillToolButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ToggleToolButton, PillButtonBase

Pill push button

Constructors

  • PillToolButton(parent: QWidget = None)

  • PillToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

paintEvent(e)
class CardWidget(parent=None)

Bases: qfluentwidgets.common.animation.BackgroundAnimationWidget, PyQt5.QtWidgets.QFrame

Card widget

clicked
mouseReleaseEvent(e)
setClickEnabled(isEnabled: bool)
isClickEnabled()
getBorderRadius()
setBorderRadius(radius: int)
paintEvent(e)
borderRadius
class ElevatedCardWidget(parent=None)

Bases: SimpleCardWidget

Card widget with shadow effect

shadowAni
elevatedAni
enterEvent(e)
leaveEvent(e)
mousePressEvent(e)
class SimpleCardWidget(parent=None)

Bases: CardWidget

Simple card widget

paintEvent(e)
class HeaderCardWidget(parent=None)

Bases: SimpleCardWidget

Header card widget

headerView
headerLabel
separator
view
vBoxLayout
headerLayout
viewLayout
getTitle()
setTitle(title: str)
title
class CardGroupWidget(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon, title: str, content: str, parent=None)

Bases: PyQt5.QtWidgets.QWidget

vBoxLayout
hBoxLayout
iconWidget
titleLabel
contentLabel
textLayout
separator
title()
setTitle(text: str)
content()
setContent(text: str)
icon()
setIcon(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon)
setIconSize(size: PyQt5.QtCore.QSize)
setSeparatorVisible(isVisible: bool)
isSeparatorVisible()
addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0)
class GroupHeaderCardWidget(parent=None)

Bases: HeaderCardWidget

Group header card widget

addGroup(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon, title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) CardGroupWidget

add widget to a new group

Parameters

icon: str | QIcon | FluentIconBase

the icon to be drawn

title: str

the title of card

content: str

the content of card

widget: QWidget

the widget to be added

stretch: int

the layout stretch of widget

groupCount()
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)
class ComboBox(parent=None)

Bases: PyQt5.QtWidgets.QPushButton, ComboBoxBase

Combo box

currentIndexChanged
currentTextChanged
activated
textActivated
arrowAni
setPlaceholderText(text: str)
setCurrentIndex(index: int)

set current index

Parameters

index: int

current index

mouseReleaseEvent(e)
paintEvent(e)
class EditableComboBox(parent=None)

Bases: qfluentwidgets.components.widgets.line_edit.LineEdit, ComboBoxBase

Editable combo box

currentIndexChanged
currentTextChanged
activated
textActivated
dropButton
setCompleterMenu(menu)

set completer menu

Parameters

menu: CompleterMenu

completer menu

currentText()
setCurrentIndex(index: int)

set current index

Parameters

index: int

current index

clear()

Clears the combobox, removing all items.

setPlaceholderText(text: str)
class ModelComboBox(parent=None)

Bases: PyQt5.QtWidgets.QPushButton, ModelComboBoxBase

Combo box build in data model

currentIndexChanged
currentTextChanged
activated
textActivated
arrowAni
setIconVisible(isVisible: bool)
isIconVisible()
setPlaceholderText(text: str)
setCurrentIndex(index: int)

set current index

Parameters

index: int

current index

clear()

Clears the combobox, removing all items.

setItemIcon(index, icon)

Sets the data role for the item on the given index

mouseReleaseEvent(e)
paintEvent(e)
class EditableModelComboBox(parent=None)

Bases: qfluentwidgets.components.widgets.line_edit.LineEdit, ModelComboBoxBase

Editable combo box build in data model

currentIndexChanged
currentTextChanged
activated
textActivated
dropButton
setCompleterMenu(menu)

set completer menu

Parameters

menu: CompleterMenu

completer menu

currentText()
setCurrentIndex(index: int)

set current index

Parameters

index: int

current index

clear()

Clears the combobox, removing all items.

setPlaceholderText(text: str)
class CommandBar(parent=None)

Bases: PyQt5.QtWidgets.QFrame

Command bar

moreButton
setSpaing(spacing: int)
spacing()
addAction(action: PyQt5.QtWidgets.QAction)

add action

Parameters

action: QAction

the action to add

addActions(actions: Iterable[PyQt5.QtWidgets.QAction])
addHiddenAction(action: PyQt5.QtWidgets.QAction)

add hidden action

addHiddenActions(actions: List[PyQt5.QtWidgets.QAction])

add hidden action

insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction)
addSeparator()
insertSeparator(index: int)
addWidget(widget: PyQt5.QtWidgets.QWidget)

add widget to command bar

removeAction(action: PyQt5.QtWidgets.QAction)
removeWidget(widget: PyQt5.QtWidgets.QWidget)
removeHiddenAction(action: PyQt5.QtWidgets.QAction)
setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle)

set the style of tool button

toolButtonStyle()
setButtonTight(isTight: bool)
isButtonTight()
setIconSize(size: PyQt5.QtCore.QSize)
iconSize()
resizeEvent(e)
minimumSizeHint() PyQt5.QtCore.QSize
updateGeometry()
suitableWidth()
resizeToSuitableWidth()
setFont(font: PyQt5.QtGui.QFont)
property commandButtons
setMenuDropDown(down: bool)

set the animation direction of more actions menu

isMenuDropDown()
class CommandButton(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.TransparentToggleToolButton

Command button

Constructors

  • CommandButton(parent: QWidget = None)

  • CommandButton(icon: QIcon | str | FluentIconBase = None, parent: QWidget = None)

setTight(isTight: bool)
isTight()
sizeHint() PyQt5.QtCore.QSize
isIconOnly()
text()
setText(text: str)
setAction(action: PyQt5.QtWidgets.QAction)
action()
paintEvent(e)
class CommandBarView(parent=None)

Bases: qfluentwidgets.components.widgets.flyout.FlyoutViewBase

Command bar view

bar
hBoxLayout
setMenuVisible(isVisible)
addWidget(widget: PyQt5.QtWidgets.QWidget)
setSpaing(spacing: int)
spacing()
addAction(action: PyQt5.QtWidgets.QAction)
addActions(actions: Iterable[PyQt5.QtWidgets.QAction])
addHiddenAction(action: PyQt5.QtWidgets.QAction)
addHiddenActions(actions: List[PyQt5.QtWidgets.QAction])
insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction)
addSeparator()
insertSeparator(index: int)
removeAction(action: PyQt5.QtWidgets.QAction)
removeWidget(widget: PyQt5.QtWidgets.QWidget)
removeHiddenAction(action: PyQt5.QtWidgets.QAction)
setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle)
toolButtonStyle()
setButtonTight(isTight: bool)
isButtonTight()
setIconSize(size: PyQt5.QtCore.QSize)
iconSize()
setFont(font: PyQt5.QtGui.QFont)
setMenuDropDown(down: bool)
suitableWidth()
resizeToSuitableWidth()
actions()
paintEvent(e)
class FlipView(parent=None)

Bases: PyQt5.QtWidgets.QListWidget

Flip view

Constructors

  • FlipView(parent: QWidget = None)

  • FlipView(orient: Qt.Orientation, parent: QWidget = None)

currentIndexChanged
orientation
isHorizontal()
setItemSize(size: PyQt5.QtCore.QSize)

set the size of item

getItemSize()

get the size of item

setBorderRadius(radius: int)

set the border radius of item

getBorderRadius()
scrollPrevious()

scroll to previous item

scrollNext()

scroll to next item

setCurrentIndex(index: int)

set current index

scrollToIndex(index)
currentIndex()
image(index: int)
addImage(image: PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str)

add image

addImages(images: List[PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str], targetSize: PyQt5.QtCore.QSize = None)

add images

setItemImage(index: int, image: PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str, targetSize: PyQt5.QtCore.QSize = None)

set the image of specified item

itemImage(index: int, load=True) PyQt5.QtGui.QImage

get the image of specified item

Parameters

index: int

the index of image

load: bool

whether to load image data

resizeEvent(e)
enterEvent(e)
leaveEvent(e)
showEvent(e)
wheelEvent(e: PyQt5.QtGui.QWheelEvent)
getAspectRatioMode()
setAspectRatioMode(mode: PyQt5.QtCore.Qt.AspectRatioMode)
itemSize
borderRadius
aspectRatioMode
class HorizontalFlipView(parent=None)

Bases: FlipView

Horizontal flip view

class VerticalFlipView(parent=None)

Bases: FlipView

Vertical flip view

class FlipImageDelegate(parent=None)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

Flip view image delegate

borderRadius = 0
itemSize(index: int)
setBorderRadius(radius: int)
paint(painter: PyQt5.QtGui.QPainter, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)
class LineEdit(parent=None)

Bases: PyQt5.QtWidgets.QLineEdit

Line edit

lightFocusedBorderColor
darkFocusedBorderColor
leftButtons: List[LineEditButton] = []
rightButtons: List[LineEditButton] = []
hBoxLayout
clearButton
isError()
setError(isError: bool)

set the error status

setCustomFocusedBorderColor(light, dark)

set the border color in focused status

Parameters

light, dark: str | QColor | Qt.GlobalColor

border color in light/dark theme mode

focusedBorderColor()
setClearButtonEnabled(enable: bool)
isClearButtonEnabled() bool
setCompleter(completer: PyQt5.QtWidgets.QCompleter)
completer()
addAction(action: PyQt5.QtWidgets.QAction, position=QLineEdit.ActionPosition.TrailingPosition)
addActions(actions, position=QLineEdit.ActionPosition.TrailingPosition)
focusOutEvent(e)
focusInEvent(e)
setCompleterMenu(menu)

set completer menu

Parameters

menu: CompleterMenu

completer menu

contextMenuEvent(e)
paintEvent(e)
class TextEdit(parent=None)

Bases: PyQt5.QtWidgets.QTextEdit

Text edit

layer
scrollDelegate
contextMenuEvent(e)
class PlainTextEdit(parent=None)

Bases: PyQt5.QtWidgets.QPlainTextEdit

Plain text edit

layer
scrollDelegate
contextMenuEvent(e)
class LineEditButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None)

Bases: PyQt5.QtWidgets.QToolButton

Line edit button

isPressed = False
setAction(action: PyQt5.QtWidgets.QAction)
action()
setIcon(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon)
mousePressEvent(e)
mouseReleaseEvent(e)
paintEvent(e)
class SearchLineEdit(parent=None)

Bases: LineEdit

Search line edit

searchSignal
clearSignal
searchButton
search()

emit search signal

setClearButtonEnabled(enable: bool)
class PasswordLineEdit(parent=None)

Bases: LineEdit

Password line edit

viewButton
setPasswordVisible(isVisible: bool)

set the visibility of password

isPasswordVisible()
setClearButtonEnabled(enable: bool)
setViewPasswordButtonVisible(isVisible: bool)

set the visibility of view password button

eventFilter(obj, e)
inputMethodQuery(query: PyQt5.QtCore.Qt.InputMethodQuery)
passwordVisible
class TextBrowser(parent=None)

Bases: PyQt5.QtWidgets.QTextBrowser

Text browser

layer
scrollDelegate
contextMenuEvent(e)
class IconWidget(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Icon widget

Constructors

  • IconWidget(parent: QWidget = None)

  • IconWidget(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

getIcon()
setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)
paintEvent(e)
icon
class PixmapLabel(parent=None)

Bases: PyQt5.QtWidgets.QLabel

Label for high dpi pixmap

setPixmap(pixmap: PyQt5.QtGui.QPixmap)
pixmap()
paintEvent(e)
class CaptionLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Caption text label

Constructors

  • CaptionLabel(parent: QWidget = None)

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

getFont()
class StrongBodyLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Strong body text label

Constructors

  • StrongBodyLabel(parent: QWidget = None)

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

getFont()
class BodyLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Body text label

Constructors

  • BodyLabel(parent: QWidget = None)

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

getFont()
class SubtitleLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Subtitle text label

Constructors

  • SubtitleLabel(parent: QWidget = None)

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

getFont()
class TitleLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Sub title text label

Constructors

  • TitleLabel(parent: QWidget = None)

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

getFont()
class LargeTitleLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Large title text label

Constructors

  • LargeTitleLabel(parent: QWidget = None)

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

getFont()
class DisplayLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: FluentLabelBase

Display text label

Constructors

  • DisplayLabel(parent: QWidget = None)

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

getFont()
class FluentLabelBase(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QLabel

Fluent label base class

Constructors

  • FluentLabelBase(parent: QWidget = None)

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

abstract getFont()
setTextColor(light=QColor(0, 0, 0), dark=QColor(255, 255, 255))

set the text color of label

Parameters

light, dark: QColor | Qt.GlobalColor | str

text color in light/dark mode

lightColor()
darkColor()
pixelFontSize()
strikeOut()
underline()
class ImageLabel(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QLabel

Image label

Constructors

  • ImageLabel(parent: QWidget = None)

  • ImageLabel(image: str | QImage | QPixmap, parent: QWidget = None)

clicked
image
setBorderRadius(topLeft: int, topRight: int, bottomLeft: int, bottomRight: int)

set the border radius of image

setImage(image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None)

set the image of label

scaledToWidth(width: int)
scaledToHeight(height: int)
setScaledSize(size: PyQt5.QtCore.QSize)
isNull()
mouseReleaseEvent(e)
setPixmap(pixmap: PyQt5.QtGui.QPixmap)
pixmap() PyQt5.QtGui.QPixmap
setMovie(movie: PyQt5.QtGui.QMovie)
paintEvent(e)
topLeftRadius()
topRightRadius()
bottomLeftRadius()
bottomRightRadius()
class AvatarWidget(parent: PyQt5.QtWidgets.QWidget = None)

Bases: ImageLabel

Avatar widget

Constructors

  • AvatarWidget(parent: QWidget = None)

  • AvatarWidget(image: str | QImage | QPixmap, parent: QWidget = None)

getRadius()
setRadius(radius: int)
setImage(image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None)

set the image of label

setBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)
paintEvent(e)
radius
class HyperlinkLabel(parent=None)

Bases: PyQt5.QtWidgets.QPushButton

Hyperlink label

Constructors

  • HyperlinkLabel(parent: QWidget = None)

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

  • HyperlinkLabel(url: QUrl, parent: QWidget = None)

getUrl() PyQt5.QtCore.QUrl
setUrl(url: PyQt5.QtCore.QUrl | str)
isUnderlineVisible()
setUnderlineVisible(isVisible: bool)
url
underlineVisible
class ListWidget(parent=None)

Bases: ListBase, PyQt5.QtWidgets.QListWidget

List widget

setCurrentItem(item: PyQt5.QtWidgets.QListWidgetItem, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)
setCurrentRow(row: int, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)
isSelectRightClickedRow()
setSelectRightClickedRow(isSelect: bool)
selectRightClickedRow
class ListView(parent=None)

Bases: ListBase, PyQt5.QtWidgets.QListView

List view

isSelectRightClickedRow()
setSelectRightClickedRow(isSelect: bool)
selectRightClickedRow
class ListItemDelegate(parent: PyQt5.QtWidgets.QListView)

Bases: qfluentwidgets.components.widgets.table_view.TableItemDelegate

List item delegate

class DWMMenu(title='', parent=None)

Bases: PyQt5.QtWidgets.QMenu

A menu with DWM shadow

windowEffect
event(e: PyQt5.QtCore.QEvent)
class LineEditMenu(parent: PyQt5.QtWidgets.QLineEdit)

Bases: EditMenu

Line edit menu

selectionStart
selectionLength
class RoundMenu(title='', parent=None)

Bases: PyQt5.QtWidgets.QMenu

Round corner menu

closedSignal
isSubMenu = False
parentMenu = None
menuItem = None
lastHoverItem = None
lastHoverSubMenuItem = None
isHideBySystem = True
itemHeight = 28
hBoxLayout
view
aniManager = None
timer
setMaxVisibleItems(num: int)

set the maximum visible items

setItemHeight(height)

set the height of menu item

setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))

add shadow to dialog

adjustSize()
icon()
title()
clear()

clear all actions

setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)

set the icon of menu

setTitle(title: str)
addAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)

add action to menu

Parameters

action: QAction

menu action

addWidget(widget: PyQt5.QtWidgets.QWidget, selectable=True, onClick=None)

add custom widget

Parameters

widget: QWidget

custom widget

selectable: bool

whether the menu item is selectable

onClick: callable

the slot connected to item clicked signal

insertAction(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)

inserts action to menu, before the action before

addActions(actions: List[PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action])

add actions to menu

Parameters

actions: Iterable[QAction]

menu actions

insertActions(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, actions: List[PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action])

inserts the actions actions to menu, before the action before

removeAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)

remove action from menu

removeMenu(menu)

remove submenu

setDefaultAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)

set the default action

addMenu(menu)

add sub menu

Parameters

menu: RoundMenu

sub round menu

insertMenu(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, menu)

insert menu before action before

addSeparator()

add seperator to menu

hideEvent(e)
closeEvent(e)
menuActions()
mousePressEvent(e)
mouseMoveEvent(e)
exec(pos, ani=True, aniType=MenuAnimationType.DROP_DOWN)

show menu

Parameters

pos: QPoint

pop-up position

ani: bool

Whether to show pop-up animation

aniType: MenuAnimationType

menu animation type

exec_(pos: PyQt5.QtCore.QPoint, ani=True, aniType=MenuAnimationType.DROP_DOWN)

show menu

Parameters

pos: QPoint

pop-up position

ani: bool

Whether to show pop-up animation

aniType: MenuAnimationType

menu animation type

adjustPosition()
paintEvent(e)
class MenuAnimationManager(menu: RoundMenu)

Bases: PyQt5.QtCore.QObject

Menu animation manager

managers
menu
ani
availableViewSize(pos: PyQt5.QtCore.QPoint)

Return the available size of view

exec(pos: PyQt5.QtCore.QPoint)
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

classmethod make(menu: RoundMenu, aniType: MenuAnimationType)
class MenuAnimationType

Bases: enum.Enum

Menu animation type

NONE = 0
DROP_DOWN = 1
PULL_UP = 2
FADE_IN_DROP_DOWN = 3
FADE_IN_PULL_UP = 4
class IndicatorMenuItemDelegate(parent=None)

Bases: MenuItemDelegate

Menu item delegate with indicator

paint(painter: PyQt5.QtGui.QPainter, option, index)
class MenuItemDelegate(parent=None)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

Menu item delegate

tooltipDelegate = None
paint(painter, option, index)
helpEvent(event, view, option, index)
class ShortcutMenuItemDelegate(parent=None)

Bases: MenuItemDelegate

Shortcut key menu item delegate

paint(painter: PyQt5.QtGui.QPainter, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)
class CheckableMenu(title='', parent=None, indicatorType=MenuIndicatorType.CHECK)

Bases: RoundMenu

Checkable menu

class MenuIndicatorType

Bases: enum.Enum

Menu indicator type

CHECK = 0
RADIO = 1
class SystemTrayMenu(title='', parent=None)

Bases: RoundMenu

System tray menu

sizeHint() PyQt5.QtCore.QSize
class CheckableSystemTrayMenu(title='', parent=None, indicatorType=MenuIndicatorType.CHECK)

Bases: CheckableMenu

Checkable system tray menu

sizeHint() PyQt5.QtCore.QSize
class InfoBar(icon: InfoBarIcon | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str, title: str, content: str, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)

Bases: PyQt5.QtWidgets.QFrame

Information bar

closedSignal
title
content
orient
icon
duration = 1000
isClosable = True
position
titleLabel
contentLabel
closeButton
iconWidget
hBoxLayout
textLayout
widgetLayout
opacityEffect
opacityAni
lightBackgroundColor = None
darkBackgroundColor = None
addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0)

add widget to info bar

setCustomBackgroundColor(light, dark)

set the custom background color

Parameters

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

eventFilter(obj, e: PyQt5.QtCore.QEvent)
closeEvent(e)
showEvent(e)
paintEvent(e)
classmethod new(icon, title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)
classmethod info(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)
classmethod success(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)
classmethod warning(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)
classmethod error(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)
classmethod desktopView()

Returns the desktop container

class InfoBarIcon

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

Info bar icon

INFORMATION = 'Info'
SUCCESS = 'Success'
WARNING = 'Warning'
ERROR = 'Error'
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 InfoBarPosition

Bases: enum.Enum

Info bar position

TOP = 0
BOTTOM = 1
TOP_LEFT = 2
TOP_RIGHT = 3
BOTTOM_LEFT = 4
BOTTOM_RIGHT = 5
NONE = 6
class InfoBarManager

Bases: PyQt5.QtCore.QObject

Info bar manager

managers
spacing = 16
margin = 24
infoBars
aniGroups
slideAnis = []
dropAnis = []
add(infoBar: InfoBar)

add info bar

remove(infoBar: InfoBar)

remove info bar

eventFilter(obj, e: PyQt5.QtCore.QEvent)
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

classmethod make(position: InfoBarPosition)

mask info bar manager according to the display position

class InfoBadge(parent: PyQt5.QtWidgets.QWidget = None, level=InfoLevel.ATTENTION)

Bases: PyQt5.QtWidgets.QLabel

Information badge

Constructors

  • InfoBadge(parent: QWidget = None, `level`=InfoLevel.ATTENTION)

  • InfoBadge(text: str, parent: QWidget = None, `level`=InfoLevel.ATTENTION)

  • InfoBadge(num: int, parent: QWidget = None, `level`=InfoLevel.ATTENTION)

  • InfoBadge(num: float, parent: QWidget = None, `level`=InfoLevel.ATTENTION)

level
lightBackgroundColor = None
darkBackgroundColor = None
manager: InfoBadgeManager = None
setLevel(level: InfoLevel)

set infomation level

setProperty(name: str, value)
setCustomBackgroundColor(light, dark)

set the custom background color

Parameters

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

paintEvent(e)
classmethod make(text: str | float, parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod info(text: str | float, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod success(text: str | float, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod attension(text: str | float, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod warning(text: str | float, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod error(text: str | float, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod custom(text: str | float, light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)

create a badge with custom background color

Parameters

text: str | float

the text of badge

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

parent: QWidget

parent widget

target: QWidget

target widget to show the badge

pos: InfoBadgePosition

the position relative to target

class InfoLevel

Bases: enum.Enum

Info level

INFOAMTION = 'Info'
SUCCESS = 'Success'
ATTENTION = 'Attension'
WARNING = 'Warning'
ERROR = 'Error'
class DotInfoBadge(parent=None, level=InfoLevel.ATTENTION)

Bases: InfoBadge

Dot info badge

paintEvent(e)
classmethod make(parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod info(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod success(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod attension(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod warning(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod error(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod custom(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)

create a badge with custom background color

Parameters

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

parent: QWidget

parent widget

class IconInfoBadge(parent: PyQt5.QtWidgets.QWidget = None, level=InfoLevel.ATTENTION)

Bases: InfoBadge

Icon icon badge

Constructors

  • IconInfoBadge(parent: QWidget = None, `level`=InfoLevel.ATTENTION)

  • IconInfoBadge(icon: QIcon | str | FluentIconBase, parent: QWidget = None, `level`=InfoLevel.ATTENTION)

setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)

set the icon of info badge

icon()
iconSize()
setIconSize(size: PyQt5.QtCore.QSize)
paintEvent(e)
classmethod make(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod info(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod success(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod attension(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod warning(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod error(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)
classmethod custom(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT)

create a badge with custom background color

Parameters

icon: QIcon | FluentIconBase

the icon of badge

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

parent: QWidget

parent widget

class InfoBadgePosition

Bases: enum.Enum

Info badge position

TOP_RIGHT = 0
BOTTOM_RIGHT = 1
RIGHT = 2
TOP_LEFT = 3
BOTTOM_LEFT = 4
LEFT = 5
NAVIGATION_ITEM = 6
class InfoBadgeManager(target: PyQt5.QtWidgets.QWidget, badge: InfoBadge)

Bases: PyQt5.QtCore.QObject

Info badge manager

managers
target
badge
eventFilter(obj, e: PyQt5.QtCore.QEvent)
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

classmethod make(position: InfoBadgePosition, target: PyQt5.QtWidgets.QWidget, badge: InfoBadge)

mask info badge manager

position()

return the position of info badge

class SingleDirectionScrollArea(parent=None, orient=Qt.Vertical)

Bases: PyQt5.QtWidgets.QScrollArea

Single direction scroll area

orient
smoothScroll
vScrollBar
hScrollBar
setVerticalScrollBarPolicy(policy)
setHorizontalScrollBarPolicy(policy)
setSmoothMode(mode)

set smooth mode

Parameters

mode: SmoothMode

smooth scroll mode

keyPressEvent(e)
wheelEvent(e: PyQt5.QtGui.QWheelEvent)
enableTransparentBackground()
class SmoothMode

Bases: enum.Enum

Smooth mode

NO_SMOOTH = 0
CONSTANT = 1
LINEAR = 2
QUADRATI = 3
COSINE = 4
class SmoothScrollArea(parent=None)

Bases: PyQt5.QtWidgets.QScrollArea

Smooth scroll area

delegate
setScrollAnimation(orient, duration, easing=QEasingCurve.OutCubic)

set scroll animation

Parameters

orient: Orient

scroll orientation

duration: int

scroll duration

easing: QEasingCurve

animation type

enableTransparentBackground()
class ScrollArea(parent=None)

Bases: PyQt5.QtWidgets.QScrollArea

Smooth scroll area

scrollDelagate
setSmoothMode(mode: qfluentwidgets.common.smooth_scroll.SmoothMode, orientation: PyQt5.QtCore.Qt.Orientation)

set smooth mode

Parameters

mode: SmoothMode

smooth scroll mode

orientation: Qt.Orientation

scroll direction

enableTransparentBackground()
class Slider(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QSlider

A slider can be clicked

Constructors

  • Slider(parent: QWidget = None)

  • Slider(orient: Qt.Orientation, parent: QWidget = None)

clicked
setThemeColor(light, dark)
setOrientation(orientation: PyQt5.QtCore.Qt.Orientation) None
mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)
property grooveLength
paintEvent(e)
resizeEvent(e)
class HollowHandleStyle(config: dict = None)

Bases: PyQt5.QtWidgets.QProxyStyle

Hollow handle style

config
subControlRect(cc: PyQt5.QtWidgets.QStyle.ComplexControl, opt: PyQt5.QtWidgets.QStyleOptionSlider, sc: PyQt5.QtWidgets.QStyle.SubControl, widget: PyQt5.QtWidgets.QWidget)

get the rectangular area occupied by the sub control

drawComplexControl(cc: PyQt5.QtWidgets.QStyle.ComplexControl, opt: PyQt5.QtWidgets.QStyleOptionSlider, painter: PyQt5.QtGui.QPainter, widget: PyQt5.QtWidgets.QWidget)

draw sub control

class ClickableSlider

Bases: PyQt5.QtWidgets.QSlider

A slider can be clicked

clicked
mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
class SpinBox(parent=None)

Bases: InlineSpinBoxBase, PyQt5.QtWidgets.QSpinBox

Spin box

class DoubleSpinBox(parent=None)

Bases: InlineSpinBoxBase, PyQt5.QtWidgets.QDoubleSpinBox

Double spin box

class DateEdit(parent=None)

Bases: InlineSpinBoxBase, PyQt5.QtWidgets.QDateEdit

Date edit

class DateTimeEdit(parent=None)

Bases: InlineSpinBoxBase, PyQt5.QtWidgets.QDateTimeEdit

Date time edit

class TimeEdit(parent=None)

Bases: InlineSpinBoxBase, PyQt5.QtWidgets.QTimeEdit

Time edit

class CompactSpinBox(parent=None)

Bases: CompactSpinBoxBase, PyQt5.QtWidgets.QSpinBox

Compact spin box

class CompactDoubleSpinBox(parent=None)

Bases: CompactSpinBoxBase, PyQt5.QtWidgets.QDoubleSpinBox

Compact double spin box

class CompactDateEdit(parent=None)

Bases: CompactSpinBoxBase, PyQt5.QtWidgets.QDateEdit

Compact date edit

class CompactDateTimeEdit(parent=None)

Bases: CompactSpinBoxBase, PyQt5.QtWidgets.QDateTimeEdit

Compact date time edit

class CompactTimeEdit(parent=None)

Bases: CompactSpinBoxBase, PyQt5.QtWidgets.QTimeEdit

Compact time edit

class PopUpAniStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

Stacked widget with pop up animation

aniFinished
aniStart
aniInfos: List[PopUpAniInfo] = []
isAnimationEnabled = True
addWidget(widget, deltaX=0, deltaY=76)

add widget to window

Parameters

widget:

widget to be added

deltaX: int

the x-axis offset from the beginning to the end of animation

deltaY: int

the y-axis offset from the beginning to the end of animation

removeWidget(widget: PyQt5.QtWidgets.QWidget)
setAnimationEnabled(isEnabled: bool)

set whether the pop animation is enabled

setCurrentIndex(index: int, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)

set current window to display

Parameters

index: int

the index of widget to display

isNeedPopOut: bool

need pop up animation or not

showNextWidgetDirectly: bool

whether to show next widget directly when animation started

duration: int

animation duration

easingCurve: QEasingCurve

the interpolation mode of animation

setCurrentWidget(widget, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)

set currect widget

Parameters

widget:

the widget to be displayed

isNeedPopOut: bool

need pop up animation or not

showNextWidgetDirectly: bool

whether to show next widget directly when animation started

duration: int

animation duration

easingCurve: QEasingCurve

the interpolation mode of animation

class OpacityAniStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

Stacked widget with fade in and fade out animation

addWidget(w: PyQt5.QtWidgets.QWidget)
setCurrentIndex(index: int)
setCurrentWidget(w: PyQt5.QtWidgets.QWidget)
class TransitionStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

aniFinished
aniStart
setAnimationEnabled(isEnabled: bool)

set whether the transition animation is enabled

isAnimationEnabled() bool

return whether the transition animation is enabled

addWidget(w)
insertWidget(index, w)
setCurrentWidget(widget: PyQt5.QtWidgets.QWidget, duration: int = None, isBack: bool = False)

set current page widget with transition animation

Parameters

widget: QWidget

target widget to display

duration: int

animation duration in milliseconds, None for default

isBack: bool

whether this is a back navigation

setCurrentIndex(index: int, duration: int = None, isBack: bool = False)

set current page index with transition animation

Parameters

index: int

page index

duration: int

animation duration in milliseconds, None for default

isBack: bool

whether this is a back navigation

class EntranceTransitionStackedWidget(parent=None)

Bases: TransitionStackedWidget

class DrillInTransitionStackedWidget(parent=None)

Bases: TransitionStackedWidget

class StateToolTip(title, content, parent=None)

Bases: PyQt5.QtWidgets.QWidget

State tooltip

closedSignal
title
content
titleLabel
contentLabel
rotateTimer
opacityEffect
animation
closeButton
isDone = False
rotateAngle = 0
deltaAngle = 20
setTitle(title: str)

set the title of tooltip

setContent(content: str)

set the content of tooltip

setState(isDone=False)

set the state of tooltip

getSuitablePos()

get suitable position in main window

paintEvent(e)

paint state tooltip

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
lightTextColor
darkTextColor
indicatorPos
hBox
indicator
label
eventFilter(obj, e: PyQt5.QtCore.QEvent)
isChecked()
setChecked(isChecked)

set checked state

setTextColor(light, dark)

set the color of text

Parameters

light, dark: str | QColor | Qt.GlobalColor

text color in light/dark theme mode

setCheckedIndicatorColor(light, dark)

set the color of indicator in checked status

Parameters

light, dark: str | QColor | Qt.GlobalColor

border color in light/dark theme mode

toggleChecked()

toggle checked state

getText()
setText(text)
getSpacing()
setSpacing(spacing)
getOnText()
setOnText(text)
getOffText()
setOffText(text)
spacing
checked
text
onText
offText
class IndicatorPosition

Bases: enum.Enum

Indicator position

LEFT = 0
RIGHT = 1
class TableView(parent=None)

Bases: TableBase, PyQt5.QtWidgets.QTableView

Table view

isSelectRightClickedRow()
setSelectRightClickedRow(isSelect: bool)
selectRightClickedRow
class TableWidget(parent=None)

Bases: TableBase, PyQt5.QtWidgets.QTableWidget

Table widget

setCurrentCell(row: int, column: int, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)
setCurrentItem(item: PyQt5.QtWidgets.QTableWidgetItem, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)
isSelectRightClickedRow()
setSelectRightClickedRow(isSelect: bool)
selectRightClickedRow
class TableItemDelegate(parent: PyQt5.QtWidgets.QTableView)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

margin = 2
hoverRow = -1
pressedRow = -1
selectedRows
lightCheckedColor
darkCheckedColor
setHoverRow(row: int)
setPressedRow(row: int)
setSelectedRows(indexes: List[PyQt5.QtCore.QModelIndex])
sizeHint(option, index)
createEditor(parent: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) PyQt5.QtWidgets.QWidget
updateEditorGeometry(editor: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)
setCheckedColor(light, dark)

set the color of indicator in checked status

Parameters

light, dark: str | QColor | Qt.GlobalColor

color in light/dark theme mode

initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)
paint(painter, option, index)
helpEvent(event: PyQt5.QtGui.QHelpEvent, view: PyQt5.QtWidgets.QAbstractItemView, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) bool
class ToolTip(text='', parent=None)

Bases: PyQt5.QtWidgets.QFrame

Tool tip

container
timer
containerLayout
label
opacityAni
shadowEffect
text()
setText(text)

set text on tooltip

duration()
setDuration(duration: int)

set tooltip duration in milliseconds

Parameters

duration: int

display duration in milliseconds, if duration <= 0, tooltip won’t disappear automatically

showEvent(e)
hideEvent(e)
adjustPos(widget, position: ToolTipPosition)

adjust the position of tooltip relative to widget

class ToolTipFilter(parent: PyQt5.QtWidgets.QWidget, showDelay=300, position=ToolTipPosition.TOP)

Bases: PyQt5.QtCore.QObject

Tool tip filter

isEnter = False
position
timer
eventFilter(obj: PyQt5.QtCore.QObject, e: PyQt5.QtCore.QEvent) bool
hideToolTip()

hide tool tip

showToolTip()

show tool tip

setToolTipDelay(delay: int)

set the delay of tool tip

class ToolTipPosition

Bases: enum.Enum

Info bar position

TOP = 0
BOTTOM = 1
LEFT = 2
RIGHT = 3
TOP_LEFT = 4
TOP_RIGHT = 5
BOTTOM_LEFT = 6
BOTTOM_RIGHT = 7
class TreeWidget(parent=None)

Bases: PyQt5.QtWidgets.QTreeWidget, TreeViewBase

Tree widget

viewportEvent(event)

Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.

class TreeView(parent=None)

Bases: PyQt5.QtWidgets.QTreeView, TreeViewBase

Tree view

viewportEvent(event)

Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.

class TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

Tree item delegate

lightCheckedColor
darkCheckedColor
setCheckedColor(light, dark)

set the color of indicator in checked status

Parameters

light, dark: str | QColor | Qt.GlobalColor

color in light/dark theme mode

paint(painter, option, index)
initStyleOption(option, index)
class CycleListWidget(items: Iterable, itemSize: PyQt5.QtCore.QSize, align=Qt.AlignCenter, parent=None)

Bases: PyQt5.QtWidgets.QListWidget

Cycle list widget

currentItemChanged
itemSize
align
upButton
downButton
scrollDuration = 250
originItems
vScrollBar
visibleNumber = 9
setItems(items: list)

set items in the list

Parameters

items: Iterable[Any]

the items to be added

itemSize: QSize

the size of item

align: Qt.AlignmentFlag

the text alignment of item

setSelectedItem(text: str)

set the selected item

scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter)

scroll to item

wheelEvent(e)
setScrollButtonRepeatEnabled(isEnabled: bool)

set whether to enable scroll button auto repeat

scrollDown()

scroll down an item

scrollUp()

scroll up an item

enterEvent(e)
leaveEvent(e)
resizeEvent(e)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
currentItem()
currentIndex()
setCurrentIndex(index: int)
class IndeterminateProgressBar(parent=None, start=True)

Bases: PyQt5.QtWidgets.QProgressBar

Indeterminate progress bar

shortBarAni
longBarAni
aniGroup
longBarAniGroup
lightBarColor()
darkBarColor()
setCustomBarColor(light, dark)

set the custom bar color

Parameters

light, dark: str | Qt.GlobalColor | QColor

bar color in light/dark theme mode

shortPos()
longPos()
start()
stop()
isStarted()
pause()
resume()
setPaused(isPaused: bool)
isPaused()
error()
setError(isError: bool)
isError()
barColor()
paintEvent(e)
class ProgressBar(parent=None, useAni=True)

Bases: PyQt5.QtWidgets.QProgressBar

lightBackgroundColor
darkBackgroundColor
ani
getVal()
setVal(v: float)
isUseAni()
setUseAni(isUSe: bool)
lightBarColor()
darkBarColor()
setCustomBarColor(light, dark)

set the custom bar color

Parameters

light, dark: str | Qt.GlobalColor | QColor

bar color in light/dark theme mode

setCustomBackgroundColor(light, dark)

set the custom background color

Parameters

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

resume()
pause()
setPaused(isPaused: bool)
isPaused()
error()
setError(isError: bool)
isError()
barColor()
valText()
paintEvent(e)
useAni
val
class ProgressRing(parent=None, useAni=True)

Bases: qfluentwidgets.components.widgets.progress_bar.ProgressBar

Progress ring

lightBackgroundColor
darkBackgroundColor
getStrokeWidth()
setStrokeWidth(w: int)
paintEvent(e)
strokeWidth
class IndeterminateProgressRing(parent=None, start=True)

Bases: PyQt5.QtWidgets.QProgressBar

Indeterminate progress ring

lightBackgroundColor
darkBackgroundColor
startAngleAni1
startAngleAni2
spanAngleAni1
spanAngleAni2
startAngleAniGroup
spanAngleAniGroup
aniGroup
startAngle()
spanAngle()
getStrokeWidth()
setStrokeWidth(w: int)
start()

start spin

stop()

stop spin

lightBarColor()
darkBarColor()
setCustomBarColor(light, dark)

set the custom bar color

Parameters

light, dark: str | Qt.GlobalColor | QColor

bar color in light/dark theme mode

setCustomBackgroundColor(light, dark)

set the custom background color

Parameters

light, dark: str | Qt.GlobalColor | QColor

background color in light/dark theme mode

paintEvent(e)
strokeWidth
class ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea)

Bases: PyQt5.QtWidgets.QWidget

Fluent scroll bar

rangeChanged
valueChanged
sliderPressed
sliderReleased
sliderMoved
groove
handle
handleDisplayMode
value()
val()
minimum()
maximum()
orientation()
pageStep()
singleStep()
isSliderDown()
setValue(value: int)
setMinimum(min: int)
setMaximum(max: int)
setRange(min: int, max: int)
setPageStep(step: int)
setSingleStep(step: int)
setSliderDown(isDown: bool)
setHandleColor(light, dark)

set the color of handle

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setArrowColor(light, dark)

set the color of arrow button

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setGrooveColor(light, dark)

set the color of groove

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setHandleDisplayMode(mode: ScrollBarHandleDisplayMode)

set the display mode of handle

expand()

expand scroll bar

collapse()

collapse scroll bar

enterEvent(e)
leaveEvent(e)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
resizeEvent(e)
mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
mouseReleaseEvent(e)
mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)
setForceHidden(isHidden: bool)

whether to force the scrollbar to be hidden

wheelEvent(e)
class SmoothScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent)

Bases: ScrollBar

Smooth scroll bar

duration = 500
ani
setValue(value, useAni=True)
scrollValue(value, useAni=True)

scroll the specified distance

scrollTo(value, useAni=True)

scroll to the specified position

resetValue(value)
mousePressEvent(e)
mouseMoveEvent(e)
setScrollAnimation(duration, easing=QEasingCurve.OutCubic)

set scroll animation

Parameters

duration: int

scroll duration

easing: QEasingCurve

animation type

class SmoothScrollDelegate(parent: PyQt5.QtWidgets.QAbstractScrollArea, useAni=False)

Bases: PyQt5.QtCore.QObject

Smooth scroll delegate

useAni = False
vScrollBar
hScrollBar
verticalSmoothScroll
horizonSmoothScroll
eventFilter(obj, e: PyQt5.QtCore.QEvent)
setVerticalScrollBarPolicy(policy)
setHorizontalScrollBarPolicy(policy)
class ScrollBarHandleDisplayMode

Bases: enum.Enum

Scroll bar handle display mode

ALWAYS = 0
ON_HOVER = 1
class TeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)

Bases: PyQt5.QtWidgets.QWidget

Teaching tip

target
duration = 1000
isDeleteOnClose = True
manager
hBoxLayout
opacityAni
bubble
setShadowEffect(blurRadius=35, offset=(0, 8))

add shadow to dialog

showEvent(e)
closeEvent(e)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)

add widget to teaching tip

property view
setView(view)
classmethod make(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)

Parameters

view: FlyoutViewBase

teaching tip view

target: QWidget

the target widget to show tip

duration: int

the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear.

tailPosition: TeachingTipTailPosition

the position of bubble tail

parent: QWidget

parent widget

isDeleteOnClose: bool

whether delete flyout automatically when flyout is closed

classmethod create(target: PyQt5.QtWidgets.QWidget, title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=True, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)

Parameters

target: QWidget

the target widget to show tip

title: str

the title of teaching tip

content: str

the content of teaching tip

icon: InfoBarIcon | FluentIconBase | QIcon | str

the icon of teaching tip

image: str | QPixmap | QImage

the image of teaching tip

isClosable: bool

whether to show the close button

duraction: int

the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear.

parent: QWidget

parent widget

isDeleteOnClose: bool

whether delete flyout automatically when flyout is closed

class TeachingTipTailPosition

Bases: enum.Enum

Teaching tip tail position

TOP = 0
BOTTOM = 1
LEFT = 2
RIGHT = 3
TOP_LEFT = 4
TOP_RIGHT = 5
BOTTOM_LEFT = 6
BOTTOM_RIGHT = 7
LEFT_TOP = 8
LEFT_BOTTOM = 9
RIGHT_TOP = 10
RIGHT_BOTTOM = 11
NONE = 12
class TeachingTipView(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=True, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None)

Bases: qfluentwidgets.components.widgets.flyout.FlyoutView

Teaching tip view

manager
hBoxLayout
paintEvent(e)
class PopupTeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)

Bases: TeachingTip

Pop up teaching tip

class FlyoutView(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=False, parent=None)

Bases: FlyoutViewBase

Flyout view

closed
icon = None
title
image = None
content
isClosable = False
vBoxLayout
viewLayout
widgetLayout
titleLabel
contentLabel
iconWidget
imageLabel
closeButton
addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)

add widget to view

showEvent(e)
class FlyoutViewBase(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Flyout view base class

abstract addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)
backgroundColor()
borderColor()
paintEvent(e)
class Flyout(view: FlyoutViewBase, parent=None, isDeleteOnClose=True, isMacInputMethodEnabled=False)

Bases: PyQt5.QtWidgets.QWidget

Flyout

closed
view
hBoxLayout
aniManager: FlyoutAnimationManager = None
isDeleteOnClose = True
isMacInputMethodEnabled = False
eventFilter(watched, event)
setShadowEffect(blurRadius=35, offset=(0, 8))

add shadow to dialog

closeEvent(e)
showEvent(e)
exec(pos: PyQt5.QtCore.QPoint, aniType=FlyoutAnimationType.PULL_UP)

show calendar view

classmethod make(view: FlyoutViewBase, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True, isMacInputMethodEnabled=False)

create and show a flyout

Parameters

view: FlyoutViewBase

flyout view

target: QWidget | QPoint

the target widget or position to show flyout

parent: QWidget

parent window

aniType: FlyoutAnimationType

flyout animation type

isDeleteOnClose: bool

whether delete flyout automatically when flyout is closed

classmethod create(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=False, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True, isMacInputMethodEnabled=False)

create and show a flyout using the default view

Parameters

title: str

the title of teaching tip

content: str

the content of teaching tip

icon: InfoBarIcon | FluentIconBase | QIcon | str

the icon of teaching tip

image: str | QPixmap | QImage

the image of teaching tip

isClosable: bool

whether to show the close button

target: QWidget | QPoint

the target widget or position to show flyout

parent: QWidget

parent window

aniType: FlyoutAnimationType

flyout animation type

isDeleteOnClose: bool

whether delete flyout automatically when flyout is closed

fadeOut()
class FlyoutAnimationType

Bases: enum.Enum

Flyout animation type

PULL_UP = 0
DROP_DOWN = 1
SLIDE_LEFT = 2
SLIDE_RIGHT = 3
FADE_IN = 4
NONE = 5
class FlyoutAnimationManager(flyout: Flyout)

Bases: PyQt5.QtCore.QObject

Flyout animation manager

managers
flyout
aniGroup
slideAni
opacityAni
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

abstract exec(pos: PyQt5.QtCore.QPoint)

start animation

abstract position(target: PyQt5.QtWidgets.QWidget)

return the top left position relative to the target

classmethod make(aniType: FlyoutAnimationType, flyout: Flyout) FlyoutAnimationManager

mask animation manager

class TabBar(parent=None)

Bases: qfluentwidgets.components.widgets.scroll_area.SingleDirectionScrollArea

Tab bar

currentChanged
tabBarClicked
tabBarDoubleClicked
tabCloseRequested
tabAddRequested
tabMoved
items: List[TabItem] = []
itemMap: Dict[str, TabItem]
dragPos
isDraging = False
lightSelectedBackgroundColor
darkSelectedBackgroundColor
closeButtonDisplayMode
view
hBoxLayout
itemLayout
widgetLayout
addButton
setAddButtonVisible(isVisible: bool)
addTab(routeKey: str, text: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, onClick=None)

add tab

Parameters

routeKey: str

the unique name of tab item

text: str

the text of tab item

text: str

the icon of tab item

onClick: callable

the slot connected to item clicked signal

insertTab(index: int, routeKey: str, text: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, onClick=None)

insert tab

Parameters

index: int

the insert position of tab item

routeKey: str

the unique name of tab item

text: str

the text of tab item

text: str

the icon of tab item

onClick: callable

the slot connected to item clicked signal

removeTab(index: int)
removeTabByKey(routeKey: str)
setCurrentIndex(index: int)

set current index

setCurrentTab(routeKey: str)
currentIndex()
currentTab()
setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)

set close button display mode

tabItem(index: int)
tab(routeKey: str)
tabRegion() PyQt5.QtCore.QRect

return the bounding rect of all tabs

tabRect(index: int)

return the visual rectangle of the tab at position index

tabData(index: int)
setTabData(index: int, data)
tabText(index: int)
tabIcon(index: int)
tabToolTip(index: int)
isTabEnabled(index: int)
setTabEnabled(index: int, isEnabled: bool)
setTabsClosable(isClosable: bool)

set whether the tab is closable

tabsClosable()
setTabIcon(index: int, icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)

set tab icon

setTabText(index: int, text: str)

set tab text

isTabVisible(index: int)
setTabVisible(index: int, isVisible: bool)

set the visibility of tab

setTabTextColor(index: int, color: PyQt5.QtGui.QColor)

set the text color of tab item

setTabToolTip(index: int, toolTip: str)

set tool tip of tab

setTabSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)

set the background in selected state

setTabShadowEnabled(isEnabled: bool)

set whether the shadow of tab is enabled

isTabShadowEnabled()
paintEvent(e)
setMovable(movable: bool)
isMovable()
setScrollable(scrollable: bool)
setTabMaximumWidth(width: int)

set the maximum width of tab

setTabMinimumWidth(width: int)

set the minimum width of tab

tabMaximumWidth()
tabMinimumWidth()
isScrollable()
count()

returns the number of tabs

clear()

Remove all tabs

mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)
mouseReleaseEvent(e)
movable
scrollable
tabMaxWidth
tabMinWidth
tabShadowEnabled
class TabItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.PushButton

Tab item

closed
doubleClicked
slideTo(x: int, duration=250)
setShadowEnabled(isEnabled: bool)

set whether the shadow is enabled

setRouteKey(key: str)
routeKey()
setBorderRadius(radius: int)
setSelected(isSelected: bool)
setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)

set close button display mode

setTextColor(color: PyQt5.QtGui.QColor)
setSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)

set background color in selected state

resizeEvent(e)
enterEvent(e)
leaveEvent(e)
mousePressEvent(e)
mouseMoveEvent(e)
mouseReleaseEvent(e)
mouseDoubleClickEvent(e: PyQt5.QtGui.QMouseEvent)
sizeHint()
paintEvent(e)
class TabCloseButtonDisplayMode

Bases: enum.Enum

Tab close button display mode

ALWAYS = 0
ON_HOVER = 1
NEVER = 2
class TabWidget(parent=None)

Bases: PyQt5.QtWidgets.QWidget

currentChanged
tabBarClicked
tabCloseRequested
tabAddRequested
tabBarDoubleClicked
tabBar
stackedWidget
vBoxLayout
addPage(widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int

Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar.

Parameters

widget: QWidget

the widget in the new tab

label: str

the title of tab

icon: str | QIcon | FluentIconBase

the icon of tab

routeKey: str

the route key of new tab, if not provided, an unique uuid will be generated as route key

Returns

index: int

the index of the tab

addTab(widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int

Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar.

Parameters

widget: QWidget

the widget in the new tab

label: str

the title of tab

icon: str | QIcon | FluentIconBase

the icon of tab

routeKey: str

the route key of new tab, if not provided, an unique uuid will be generated as route key

Returns

index: int

the index of the tab

insertTab(index: int, widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int

Inserts a tab with the given label and page into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar.

Parameters

index: int

the index of new tab to be inserted

widget: QWidget

the widget in the new tab

label: str

the title of tab

icon: str | QIcon | FluentIconBase

the icon of tab

routeKey: str

the route key of new tab, if not provided, an unique uuid will be generated as route key

Returns

index: int

the index of the tab

removeTab(index: int)

Removes the tab at position index from this stack of widgets. The page widget itself is not deleted.

Parameters

index: int

the index of removed widget

clear()

Removes all the pages, but does not delete them.

widget(index: int)

Returns the tab page at index position index or None if the index is out of range.

currentWidget() PyQt5.QtWidgets.QWidget

Returns a pointer to the page currently being displayed.

currentIndex()

Returns the index position of the current tab page, returns -1 if there is no current widget.

setTabBar(tabBar)

Replaces the original tab bar with new one. Note that this must be called before any tabs have been added, or the behavior is undefined.

isMovable()

Returns whether the user can move the tabs within the tabbar area.

setMovable(movable: bool)
isTabEnabled(index: int)
setTabEnabled(index: int, isEnabled: bool)
isTabVisible(index: int)
setTabVisible(index: int, isVisible: bool)
tabText(index: int)
tabIcon(index: int)
tabToolTip(index: int)
setTabsClosable(closable: bool)
tabsClosable() bool
setTabIcon(index: int, icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)
setTabText(index: int, text: str)
setTabToolTip(index: int, tip: str)
setTabTextColor(index: int, color)
setTabSelectedBackgroundColor(light, dark)
setTabShadowEnabled(enabled: bool)
setScrollable(scrollable: bool)
isScrollable() bool
setTabMaximumWidth(width: int)
setTabMinimumWidth(width: int)
tabMaximumWidth() int
tabMinimumWidth() int
tabData(index: int)
setTabData(index: int, data)
count() int

Returns the number of tabs in the tab bar.

setCurrentIndex(index: int)

the index of the tab bar’s visible tab

setCurrentWidget(widget: PyQt5.QtWidgets.QWidget)

Sets the current tab to the tab which contains the given widget.

setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)
class PipsPager(parent=None)

Bases: PyQt5.QtWidgets.QListWidget

Pips pager

Constructors

  • PipsPager(parent: QWidget = None)

  • PipsPager(orient: Qt.Orientation, parent: QWidget = None)

currentIndexChanged
orientation
setPageNumber(n: int)

set the number of page

getPageNumber()

get the number of page

getVisibleNumber()

get the number of visible pips

setVisibleNumber(n: int)
scrollNext()

scroll down an item

scrollPrevious()

scroll up an item

scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter)

scroll to item

adjustSize() None
isHorizontal()
setCurrentIndex(index: int)

set current index

isPreviousButtonVisible()
isNextButtonVisible()
currentIndex()
setPreviousButtonDisplayMode(mode: PipsScrollButtonDisplayMode)

set the display mode of previous button

setNextButtonDisplayMode(mode: PipsScrollButtonDisplayMode)

set the display mode of next button

mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
wheelEvent(e)
resizeEvent(e)
visibleNumber
pageNumber
class VerticalPipsPager(parent=None)

Bases: PipsPager

Vertical pips pager

class HorizontalPipsPager(parent=None)

Bases: PipsPager

Horizontal pips pager

class PipsScrollButtonDisplayMode

Bases: enum.Enum

Pips pager scroll button display mode

ALWAYS = 0
ON_HOVER = 1
NEVER = 2
class HorizontalSeparator(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Horizontal separator

paintEvent(e)
class VerticalSeparator(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Vertical separator

paintEvent(e)
class NavigationWidget(isSelectable: bool, parent=None)

Bases: PyQt5.QtWidgets.QWidget

Navigation widget

clicked
selectedChanged
EXPAND_WIDTH = 312
isCompacted = True
isSelected = False
isPressed = False
isEnter = False
isAboutSelected = False
isSelectable
treeParent = None
nodeDepth = 0
lightTextColor
darkTextColor
lightIndicatorColor
darkIndicatorColor
enterEvent(e)
leaveEvent(e)
mousePressEvent(e)
mouseReleaseEvent(e)
click()
setCompacted(isCompacted: bool)

set whether the widget is compacted

setSelected(isSelected: bool)

set whether the button is selected

Parameters

isSelected: bool

whether the button is selected

textColor()
setLightTextColor(color)

set the text color in light theme mode

setDarkTextColor(color)

set the text color in dark theme mode

setTextColor(light, dark)

set the text color in light/dark theme mode

setAboutSelected(selected: bool)
indicatorRect()

get the indicator geometry

setIndicatorColor(light, dark)
class NavigationPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)

Bases: NavigationWidget

Navigation push button

text()
setText(text: str)
icon()
setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)
paintEvent(e)
class NavigationSeparator(parent=None)

Bases: NavigationWidget

Navigation Separator

setCompacted(isCompacted: bool)

set whether the widget is compacted

paintEvent(e)
class NavigationToolButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, parent=None)

Bases: NavigationPushButton

Navigation tool button

setCompacted(isCompacted: bool)

set whether the widget is compacted

class NavigationTreeWidget(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)

Bases: NavigationTreeWidgetBase

Navigation tree widget

expanded
treeChildren: List[NavigationTreeWidget] = []
isExpanded = False
itemWidget
vBoxLayout
expandAni
addChild(child)

add child

Parameters

child: NavigationTreeWidgetBase

child item

text()
icon()
setText(text)
setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)
textColor()
setLightTextColor(color)

set the text color in light theme mode

setDarkTextColor(color)

set the text color in dark theme mode

setTextColor(light, dark)

set the text color in light/dark theme mode

setIndicatorColor(light, dark)

set the indicator color in light/dark theme mode

setFont(font: PyQt5.QtGui.QFont)
clone()
suitableWidth()
insertChild(index, child)

insert child

Parameters

child: NavigationTreeWidgetBase

child item

removeChild(child)

remove child

Parameters

child: NavigationTreeWidgetBase

child item

childItems() list

return child items

setExpanded(isExpanded: bool, ani=False)

set the expanded status

isRoot()

is root node

isLeaf()

is leaf node

setSelected(isSelected: bool)

set whether the button is selected

Parameters

isSelected: bool

whether the button is selected

mouseReleaseEvent(e)
setCompacted(isCompacted: bool)

set whether the widget is compacted

setAboutSelected(selected: bool)
setRememberExpandState(remember: bool)

set whether to remember expand state

saveExpandState()

save current expand state

restoreExpandState(ani=True)

restore saved expand state

class NavigationTreeWidgetBase(isSelectable: bool, parent=None)

Bases: NavigationWidget

Navigation tree widget base class

abstract addChild(child)

add child

Parameters

child: NavigationTreeWidgetBase

child item

abstract insertChild(index: int, child: NavigationWidget)

insert child

Parameters

child: NavigationTreeWidgetBase

child item

abstract removeChild(child: NavigationWidget)

remove child

Parameters

child: NavigationTreeWidgetBase

child item

isRoot()

is root node

isLeaf()

is leaf node

abstract setExpanded(isExpanded: bool)

set the expanded status

Parameters

isExpanded: bool

whether to expand node

abstract childItems() list

return child items

abstract setRememberExpandState(remember: bool)

set whether to remember expand state

abstract saveExpandState()

save current expand state

abstract restoreExpandState(ani=True)

restore saved expand state

class NavigationAvatarWidget(name: str, avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, parent=None)

Bases: NavigationWidget

Avatar widget

name
avatar
setName(name: str)
setAvatar(avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage)
paintEvent(e)
class NavigationItemHeader(text: str, parent=None)

Bases: NavigationWidget

Navigation item header for grouping items

lightTextColor
darkTextColor
heightAni
text()
setText(text: str)
setCompacted(isCompacted: bool)

set whether the widget is compacted

mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
paintEvent(e)
class NavigationUserCard(parent=None)

Bases: NavigationAvatarWidget

Navigation user card widget

setAvatarIcon(icon: qfluentwidgets.common.icon.FluentIcon)

set avatar icon when no image is set

setAvatarBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)

set avatar background color in light/dark theme mode

title()

get user card title

setTitle(title: str)

set user card title

subtitle()

get user card subtitle

setSubtitle(subtitle: str)

set user card subtitle

setTitleFontSize(size: int)

set title font size

setSubtitleFontSize(size: int)

set subtitle font size

setAnimationDuration(duration: int)

set animation duration in milliseconds

setCompacted(isCompacted: bool)

set whether the widget is compacted

paintEvent(e)
textOpacity()
subtitleColor()
class NavigationPanel(parent=None, isMinimalEnabled=False)

Bases: PyQt5.QtWidgets.QFrame

Navigation panel

displayModeChanged
indicator
acrylicBrush
scrollArea
scrollWidget
menuButton
returnButton
vBoxLayout
topLayout
bottomLayout
scrollLayout
items: Dict[str, NavigationItem]
history
expandAni
expandWidth = 322
minimumExpandWidth = 1008
isMinimalEnabled = False
isIndicatorAnimationEnabled()
setIndicatorAnimationEnabled(isEnabled: bool)
isUpdateIndicatorPosOnCollapseFinished()
setUpdateIndicatorPosOnCollapseFinished(update: bool)
widget(routeKey: str)
addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)

add navigation item

Parameters

routeKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

selectable: bool

whether the item is selectable

tooltip: str

the tooltip of item

parentRouteKey: str

the route key of parent item, the parent widget should be NavigationTreeWidget

addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)

add custom widget

Parameters

routeKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

tooltip: str

the tooltip of widget

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidget

insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey=None)

insert navigation tree item

Parameters

index: int

the insert position of parent widget

routeKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

selectable: bool

whether the item is selectable

tooltip: str

the tooltip of item

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidget

insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)

insert custom widget

Parameters

index: int

insert position

routeKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

tooltip: str

the tooltip of widget

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidget

addSeparator(position=NavigationItemPosition.TOP)

add separator

Parameters

position: NavigationPostion

where to add the separator

insertSeparator(index: int, position=NavigationItemPosition.TOP)

add separator

Parameters

index: int

insert position

position: NavigationPostion

where to add the separator

addItemHeader(text: str, position=NavigationItemPosition.TOP)

add item header

Parameters

text: str

header text

position: NavigationItemPosition

where to add the header

Returns

NavigationItemHeader

created header widget

insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP)

insert item header

Parameters

index: int

insert position

text: str

header text

position: NavigationItemPosition

where to add the header

Returns

NavigationItemHeader

created header widget

removeWidget(routeKey: str)

remove widget

Parameters

routeKey: str

the unique name of item

setMenuButtonVisible(isVisible: bool)

set whether the menu button is visible

setReturnButtonVisible(isVisible: bool)

set whether the return button is visible

setCollapsible(on: bool)
setExpandWidth(width: int)

set the maximum width

setMinimumExpandWidth(width: int)

Set the minimum window width that allows panel to be expanded

setAcrylicEnabled(isEnabled: bool)
isAcrylicEnabled()

whether the acrylic effect is enabled

expand(useAni=True)

expand navigation panel

collapse()

collapse navigation panel

toggle()

toggle navigation panel

setCurrentItem(routeKey: str)

set current selected item

Parameters

routeKey: str

the unique name of item

currentItem()
isCollapsed()
eventFilter(obj, e: PyQt5.QtCore.QEvent)
layoutMinHeight()
paintEvent(e)
class NavigationItemPosition

Bases: enum.Enum

Navigation item position

TOP = 0
SCROLL = 1
BOTTOM = 2
class NavigationDisplayMode

Bases: enum.Enum

Navigation display mode

MINIMAL = 0
COMPACT = 1
EXPAND = 2
MENU = 3
class NavigationInterface(parent=None, showMenuButton=True, showReturnButton=False, collapsible=True)

Bases: PyQt5.QtWidgets.QWidget

Navigation interface

displayModeChanged
panel
addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget

add navigation item

Parameters

routKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

selectable: bool

whether the item is selectable

position: NavigationItemPosition

where the button is added

tooltip: str

the tooltip of item

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidgetBase

addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)

add custom widget

Parameters

routKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the widget is added

tooltip: str

the tooltip of widget

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidgetBase

insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget

insert navigation item

Parameters

index: int

insert position

routKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

selectable: bool

whether the item is selectable

position: NavigationItemPosition

where the item is added

tooltip: str

the tooltip of item

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidgetBase

insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)

insert custom widget

Parameters

index: int

insert position

routKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the widget is added

tooltip: str

the tooltip of widget

parentRouteKey: str

the route key of parent item, the parent item should be NavigationTreeWidgetBase

addSeparator(position=NavigationItemPosition.TOP)

add separator

Parameters

position: NavigationPostion

where to add the separator

addItemHeader(text: str, position=NavigationItemPosition.TOP)

add item header for grouping navigation items

Parameters

text: str

header text to display

position: NavigationItemPosition

where the header is added

Returns

NavigationItemHeader

created header widget

insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP)

insert item header for grouping navigation items

Parameters

index: int

insert position

text: str

header text to display

position: NavigationItemPosition

where the header is added

Returns

NavigationItemHeader

created header widget

addUserCard(routeKey: str, avatar: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase = None, title: str = '', subtitle: str = '', onClick=None, position=NavigationItemPosition.TOP, aboveMenuButton: bool = False)

add user card to navigation panel

Parameters

routeKey: str

the unique name of user card

avatar: str | QIcon | FluentIconBase

avatar image or icon

title: str

user name or title text

subtitle: str

subtitle text (e.g., email, status)

onClick: callable

the slot connected to card clicked signal

position: NavigationItemPosition

where the card is added

aboveMenuButton: bool

whether to place the card above the menu button (expand/collapse button)

Returns

NavigationUserCard

created user card widget

insertSeparator(index: int, position=NavigationItemPosition.TOP)

add separator

Parameters

index: int

insert position

position: NavigationPostion

where to add the separator

removeWidget(routeKey: str)

remove widget

Parameters

routKey: str

the unique name of item

setCurrentItem(name: str)

set current selected item

Parameters

name: str

the unique name of item

expand(useAni=True)

expand navigation panel

toggle()

toggle navigation panel

setExpandWidth(width: int)

set the maximum width

setMinimumExpandWidth(width: int)

Set the minimum window width that allows panel to be expanded

setMenuButtonVisible(isVisible: bool)

set whether the menu button is visible

setReturnButtonVisible(isVisible: bool)

set whether the return button is visible

setCollapsible(collapsible: bool)
isAcrylicEnabled()
setAcrylicEnabled(isEnabled: bool)

set whether the acrylic background effect is enabled

isIndicatorAnimationEnabled()
setIndicatorAnimationEnabled(isEnabled: bool)

set whether the indicator sliding animation is enabled

isUpdateIndicatorPosOnCollapseFinished()
setUpdateIndicatorPosOnCollapseFinished(update: bool)

set whether to update indicator position when collapese finished

widget(routeKey: str)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
resizeEvent(e: PyQt5.QtGui.QResizeEvent)
class NavigationBarPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, selectedIcon=None, parent=None)

Bases: qfluentwidgets.components.navigation.navigation_widget.NavigationPushButton

Navigation bar push button

iconAni
lightSelectedColor
darkSelectedColor
setSelectedColor(light, dark)
selectedIcon()
setSelectedIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)
setSelectedTextVisible(isVisible)
indicatorRect()

get the indicator geometry

paintEvent(e)
setSelected(isSelected: bool)

set whether the button is selected

Parameters

isSelected: bool

whether the button is selected

class NavigationBar(parent=None)

Bases: PyQt5.QtWidgets.QWidget

indicator
lightSelectedColor
darkSelectedColor
scrollArea
scrollWidget
vBoxLayout
topLayout
bottomLayout
scrollLayout
items: Dict[str, qfluentwidgets.components.navigation.navigation_widget.NavigationWidget]
history
widget(routeKey: str)
addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)

add navigation item

Parameters

routeKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

selectable: bool

whether the item is selectable

selectedIcon: str | QIcon | FluentIconBase

the icon of navigation item in selected state

position: NavigationItemPosition

where the button is added

addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)

add custom widget

Parameters

routeKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)

insert navigation tree item

Parameters

index: int

the insert position of parent widget

routeKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

selectable: bool

whether the item is selectable

selectedIcon: str | QIcon | FluentIconBase

the icon of navigation item in selected state

position: NavigationItemPosition

where the button is added

insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)

insert custom widget

Parameters

index: int

insert position

routeKey: str

the unique name of item

widget: NavigationWidget

the custom widget to be added

onClick: callable

the slot connected to item clicked signal

position: NavigationItemPosition

where the button is added

removeWidget(routeKey: str)

remove widget

Parameters

routeKey: str

the unique name of item

currentItem()
setCurrentItem(routeKey: str)

set current selected item

Parameters

routeKey: str

the unique name of item

setFont(font: PyQt5.QtGui.QFont)

set the font of navigation item

setSelectedTextVisible(isVisible: bool)

set whether the text is visible when button is selected

isSelectedTextVisible()
setSelectedColor(light, dark)

set the selected color of all items

buttons()
isIndicatorAnimationEnabled()
setIndicatorAnimationEnabled(isEnabled: bool)
class Pivot(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Pivot

currentItemChanged
items: Dict[str, PivotItem]
lightIndicatorColor
darkIndicatorColor
hBoxLayout
slideAni
addItem(routeKey: str, text: str, onClick=None, icon=None)

add item

Parameters

routeKey: str

the unique name of item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

icon: str

the icon of navigation item

addWidget(routeKey: str, widget: PivotItem, onClick=None)

add widget

Parameters

routeKey: str

the unique name of item

widget: PivotItem

navigation widget

onClick: callable

the slot connected to item clicked signal

insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)

insert item

Parameters

index: int

insert position

routeKey: str

the unique name of item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

icon: str

the icon of navigation item

insertWidget(index: int, routeKey: str, widget: PivotItem, onClick=None)

insert item

Parameters

index: int

insert position

routeKey: str

the unique name of item

widget: PivotItem

navigation widget

onClick: callable

the slot connected to item clicked signal

removeWidget(routeKey: str)

remove widget

Parameters

routeKey: str

the unique name of item

clear()

clear all navigation items

currentItem()

Returns the current selected item

currentRouteKey()
setCurrentItem(routeKey: str)

set current selected item

Parameters

routeKey: str

the unique name of item

showEvent(e)
setIndicatorLength(len: int)
indicatorLength()
setItemFontSize(size: int)

set the pixel font size of items

setItemText(routeKey: str, text: str)

set the text of item

setIndicatorColor(light, dark)
widget(routeKey: str)
resizeEvent(e) None
currentIndicatorGeometry()
paintEvent(e)
class PivotItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.PushButton

Pivot item

itemClicked
setSelected(isSelected: bool)
class SegmentedItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.navigation.pivot.PivotItem

Segmented item

class SegmentedWidget(parent=None)

Bases: qfluentwidgets.components.navigation.pivot.Pivot

Segmented widget

slideAni
insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)

insert item

Parameters

index: int

insert position

routeKey: str

the unique name of item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

icon: str

the icon of navigation item

paintEvent(e)
currentIndicatorGeometry()
class SegmentedToolItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.ToolButton

Pivot item

itemClicked
setSelected(isSelected: bool)
class SegmentedToolWidget(parent=None)

Bases: SegmentedWidget

Segmented tool widget

addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, onClick=None)

add item

Parameters

routeKey: str

the unique name of item

icon: str | QIcon | FluentIconBase

the icon of navigation item

onClick: callable

the slot connected to item clicked signal

insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, onClick=None)

insert item

Parameters

index: int

insert position

routeKey: str

the unique name of item

text: str

the text of navigation item

onClick: callable

the slot connected to item clicked signal

icon: str

the icon of navigation item

class SegmentedToggleToolItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.TransparentToolButton

Transparent background tool button

Constructors

  • TransparentToolButton(parent: QWidget = None)

  • TransparentToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)

itemClicked
setSelected(isSelected: bool)
class SegmentedToggleToolWidget(parent=None)

Bases: SegmentedToolWidget

Segmented toggle tool widget

paintEvent(e)
class BreadcrumbBar(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Breadcrumb bar

currentItemChanged
currentIndexChanged
itemMap: Dict[BreadcrumbItem]
items: List[BreadcrumbItem] = []
hiddenItems: List[BreadcrumbItem] = []
elideButton
addItem(routeKey: str, text: str)

add item

Parameters

routeKey: str

unique key of item

text: str

the text of item

setCurrentIndex(index: int)
setCurrentItem(routeKey: str)
setItemText(routeKey: str, text: str)
item(routeKey: str) BreadcrumbItem
itemAt(index: int)
currentIndex()
currentItem() BreadcrumbItem
resizeEvent(e)
clear()

clear all items

popItem()

pop trailing item

count()

Returns the number of items

updateGeometry()
isElideVisible()
setFont(font: PyQt5.QtGui.QFont)
getSpacing()
setSpacing(spacing: int)
spacing
class BreadcrumbItem(routeKey: str, text: str, index: int, parent=None)

Bases: BreadcrumbWidget

Breadcrumb item

text
routeKey
isHover = False
isPressed = False
isSelected = False
index
spacing = 5
setText(text: str)
isRoot()
setSelected(isSelected: bool)
setFont(font: PyQt5.QtGui.QFont)
setSpacing(spacing: int)
paintEvent(e)
class CalendarPicker(parent=None)

Bases: PyQt5.QtWidgets.QPushButton

Calendar picker

dateChanged
getDate()
setDate(date: PyQt5.QtCore.QDate)

set the selected date

reset()

reset date

getDateFormat()
setDateFormat(format: PyQt5.QtCore.Qt.DateFormat | str)
isRestEnabled()
setResetEnabled(isEnabled: bool)

set the visibility of reset button

paintEvent(e)
date
dateFormat
class FastCalendarPicker(parent=None)

Bases: CalendarPicker

Pro calendar picker

flyoutAnimationType
setFlyoutAnimationType(aniType: qfluentwidgets.components.widgets.flyout.FlyoutAnimationType)
class DatePickerBase(parent=None)

Bases: qfluentwidgets.components.date_time.picker_base.PickerBase

Date picker base class

dateChanged
calendar
getDate()
abstract setDate(date: PyQt5.QtCore.QDate)

set current date

setYearFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)
setMonthFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)
setDayFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)
yearFormatter()
dayFormatter()
monthFormatter()
reset()

Reset date

class DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True)

Bases: DatePickerBase

Date picker

MM_DD_YYYY = 0
YYYY_MM_DD = 1
MONTH
YEAR
DAY
isMonthTight = True
setDateFormat(format: int)

set the format of date

Parameters

format: int

the format of date, could be DatePicker.MM_DD_YYYY or DatePicker.YYYY_MM_DD

panelInitialValue()

initial value of panel

setMonthTight(isTight: bool)

set whether the month column is tight

getDate()
setDate(date: PyQt5.QtCore.QDate)

set current date

date
class ZhDatePicker(parent=None)

Bases: DatePicker

Chinese date picker

MONTH = '月'
YEAR = '年'
DAY = '日'
class PickerBase(parent=None)

Bases: PyQt5.QtWidgets.QPushButton

Picker base class

columns: List[PickerColumnButton] = []
lightSelectedBackgroundColor
darkSelectedBackgroundColor
hBoxLayout
setSelectedBackgroundColor(light, dark)

set the background color of selected row

addColumn(name: str, items: Iterable, width: int, align=Qt.AlignCenter, formatter: PickerColumnFormatter = None)

add column

Parameters

name: str

the name of column

items: Iterable

the items of column

width: int

the width of column

align: Qt.AlignmentFlag

the text alignment of button

formatter: PickerColumnFormatter

the formatter of column

setColumnAlignment(index: int, align=Qt.AlignCenter)

set the text alignment of specified column

setColumnWidth(index: int, width: int)

set the width of specified column

setColumnTight(index: int)

make the specified column to be tight

setColumnVisible(index: int, isVisible: bool)

set the text alignment of specified column

value()
initialValue()
setColumnValue(index: int, value)
setColumnInitialValue(index: int, value)
setColumnFormatter(index: int, formatter: PickerColumnFormatter)
setColumnItems(index: int, items: Iterable)
encodeValue(index: int, value)

convert original value to formatted value

decodeValue(index: int, value)

convert formatted value to origin value

setColumn(index: int, name: str, items: Iterable, width: int, align=Qt.AlignCenter)

set column

Parameters

index: int

the index of column

name: str

the name of column

items: Iterable

the items of column

width: int

the width of column

align: Qt.AlignmentFlag

the text alignment of button

clearColumns()

clear columns

enterEvent(e)
leaveEvent(e)
mousePressEvent(e)
mouseReleaseEvent(e)
panelInitialValue()

initial value of panel

setScrollButtonRepeatEnabled(isEnabled: bool)

set whether to enable scroll button auto repeat

reset()
isRestEnabled()
setResetEnabled(isEnabled: bool)

set the visibility of reset button

class PickerPanel(parent=None)

Bases: PyQt5.QtWidgets.QWidget

picker panel

confirmed
resetted
columnValueChanged
itemHeight = 37
listWidgets: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget] = []
view
itemMaskWidget
hSeparatorWidget
yesButton
resetButton
cancelButton
hBoxLayout
listLayout
buttonLayout
vBoxLayout
scrollButtonRepeatEnabled = True
setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))

add shadow to dialog

setResetEnabled(isEnabled: bool)

set the visibility of reset button

setScrollButtonRepeatEnabled(isEnabled: bool)

set whether to enable scroll button auto repeat

setSelectedBackgroundColor(light, dark)
isResetEnabled()
addColumn(items: Iterable, width: int, align=Qt.AlignCenter)

add one column to view

Parameters

items: Iterable[Any]

the items to be added

width: int

the width of item

align: Qt.AlignmentFlag

the text alignment of item

resizeEvent(e)
value()

return the value of columns

setValue(value: list)

set the value of columns

columnValue(index: int) str

return the value of specified column

setColumnValue(index: int, value: str)

set the value of specified column

column(index: int)

return the list widget of specified column

exec(pos, ani=True)

show panel

Parameters

pos: QPoint

pop-up position

ani: bool

Whether to show pop-up animation

class PickerColumnFormatter

Bases: PyQt5.QtCore.QObject

Picker column formatter

encode(value)

convert original value to formatted value

decode(value: str)

convert formatted value to original value

class TimePicker(parent=None, showSeconds=False)

Bases: TimePickerBase

24 hours time picker

setTime(time)

set current time

Parameters

time: QTime

current time

setSecondVisible(isVisible: bool)

set the visibility of seconds column

panelInitialValue()

initial value of panel

getTime()
isSecondVisible()
time
secondVisible
class AMTimePicker(parent=None, showSeconds=False)

Bases: TimePickerBase

AM/PM time picker

AM
PM
setSecondVisible(isVisible: bool)

set the visibility of seconds column

setTime(time)

set current time

Parameters

time: QTime

current time

panelInitialValue()

initial value of panel

getTime()
isSecondVisible()
time
secondVisible