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

ExpandLayout

Expand layout

FlowLayout

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

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

CheckBox

Check box

ComboBox

Combo box

EditableComboBox

Editable combo box

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

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

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

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

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

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

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

Bases: qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase

Message box base

accepted
rejected
hideYesButton()
hideCancelButton()
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

addItem(item)
addWidget(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 VBoxLayout(parent)

Bases: PyQt5.QtWidgets.QVBoxLayout

Vertical box layout

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

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
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
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
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
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

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
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

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

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

addGroupWidget(widget: PyQt5.QtWidgets.QWidget)

add widget to group

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
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
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
class SettingCardGroup(title: str, parent=None)

Bases: PyQt5.QtWidgets.QWidget

Setting card group

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)

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)

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)

url
getUrl()
setUrl(url: str | PyQt5.QtCore.QUrl)
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)

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
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
text_
icon_
text()
setText(text: str)
icon()
setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)
setIconSize(size: PyQt5.QtCore.QSize)
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
icon_
icon()
setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)
setIconSize(size: PyQt5.QtCore.QSize)
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 | FluentIcon, 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
borderRadius
mouseReleaseEvent(e)
setClickEnabled(isEnabled: bool)
isClickEnabled()
getBorderRadius()
setBorderRadius(radius: int)
paintEvent(e)
class ElevatedCardWidget(parent=None)

Bases: SimpleCardWidget

Card widget with shadow effect

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

title
getTitle()
setTitle(title: str)
class CheckBox(parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QCheckBox

Check box

Constructors

  • CheckBox(parent: QWidget = None)

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

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

Bases: PyQt5.QtWidgets.QPushButton, ComboBoxBase

Combo box

currentIndexChanged
currentTextChanged
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
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

property commandButtons
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)
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

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
itemSize
borderRadius
aspectRatioMode
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) PyQt5.QtGui.QImage

get the image of specified item

resizeEvent(e)
enterEvent(e)
leaveEvent(e)
showEvent(e)
wheelEvent(e: PyQt5.QtGui.QWheelEvent)
getAspectRatioMode()
setAspectRatioMode(mode: PyQt5.QtCore.Qt.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

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

setClearButtonEnabled(enable: bool)
isClearButtonEnabled() bool
setCompleter(completer: PyQt5.QtWidgets.QCompleter)
completer()
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

contextMenuEvent(e)
class PlainTextEdit(parent=None)

Bases: PyQt5.QtWidgets.QPlainTextEdit

Plain text edit

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

Bases: PyQt5.QtWidgets.QToolButton

Line edit button

mousePressEvent(e)
mouseReleaseEvent(e)
paintEvent(e)
class SearchLineEdit(parent=None)

Bases: LineEdit

Search line edit

searchSignal
clearSignal
search()

emit search signal

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

Bases: LineEdit

Password line edit

passwordVisible
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)
class IconWidget(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Icon widget

Constructors

  • IconWidget(parent: QWidget = None)

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

icon
getIcon()
setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)
paintEvent(e)
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
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)
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)

radius
getRadius()
setRadius(radius: int)
paintEvent(e)
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)

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

Bases: ListBase, PyQt5.QtWidgets.QListWidget

List widget

selectRightClickedRow
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)
class ListView(parent=None)

Bases: ListBase, PyQt5.QtWidgets.QListView

List view

selectRightClickedRow
isSelectRightClickedRow()
setSelectRightClickedRow(isSelect: bool)
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

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

Bases: EditMenu

Line edit menu

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

Bases: PyQt5.QtWidgets.QMenu

Round corner menu

closedSignal
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

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

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
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

Bases: MenuItemDelegate

Menu item delegate with indicator

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

Bases: PyQt5.QtWidgets.QStyledItemDelegate

Menu item delegate

paint(painter, option, index)
class ShortcutMenuItemDelegate

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
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)
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
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)

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
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

setVerticalScrollBarPolicy(policy)
setHorizontalScrollBarPolicy(policy)
setSmoothMode(mode)

set smooth mode

Parameters

mode: SmoothMode

smooth scroll mode

keyPressEvent(e)
wheelEvent(e: PyQt5.QtGui.QWheelEvent)
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

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

set scroll animation

Parameters

orient: Orient

scroll orientation

duration: int

scroll duration

easing: QEasingCurve

animation type

class ScrollArea(parent=None)

Bases: PyQt5.QtWidgets.QScrollArea

Smooth scroll area

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)

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

Bases: PyQt5.QtWidgets.QProxyStyle

Hollow handle style

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
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)
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 StateToolTip(title, content, parent=None)

Bases: PyQt5.QtWidgets.QWidget

State tooltip

closedSignal
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
spacing
checked
text
onText
offText
eventFilter(obj, e: PyQt5.QtCore.QEvent)
isChecked()
setChecked(isChecked)

set checked state

toggleChecked()

toggle checked state

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

Bases: enum.Enum

Indicator position

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

Bases: TableBase, PyQt5.QtWidgets.QTableView

Table view

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

Bases: TableBase, PyQt5.QtWidgets.QTableWidget

Table widget

selectRightClickedRow
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)
class TableItemDelegate(parent: PyQt5.QtWidgets.QTableView)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

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)
initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)
paint(painter, option, index)
class ToolTip(text='', parent=None)

Bases: PyQt5.QtWidgets.QFrame

Tool tip

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

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

class TreeView(parent=None)

Bases: PyQt5.QtWidgets.QTreeView, TreeViewBase

Tree view

class TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView)

Bases: PyQt5.QtWidgets.QStyledItemDelegate

Tree item delegate

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
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)
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

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

useAni
val
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)
class ProgressRing(parent=None, useAni=True)

Bases: qfluentwidgets.components.widgets.progress_bar.ProgressBar

Progress ring

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

Bases: PyQt5.QtWidgets.QProgressBar

Indeterminate progress ring

strokeWidth
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)
class ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea)

Bases: PyQt5.QtWidgets.QWidget

Fluent scroll bar

rangeChanged
valueChanged
sliderPressed
sliderReleased
sliderMoved
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)
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

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

eventFilter(obj, e: PyQt5.QtCore.QEvent)
setVerticalScrollBarPolicy(policy)
setHorizontalScrollBarPolicy(policy)
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

property view
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

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

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
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)

Bases: PyQt5.QtWidgets.QWidget

Flyout

closed
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)

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)

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
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
tabCloseRequested
tabAddRequested
movable
scrollable
tabMaxWidth
tabMinWidth
tabShadowEnabled
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

tabText(index: int)
tabIcon(index: int)
tabToolTip(index: int)
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

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

mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)
mouseReleaseEvent(e)
class TabItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.PushButton

Tab item

closed
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)
sizeHint()
paintEvent(e)
class TabCloseButtonDisplayMode

Bases: enum.Enum

Tab close button display mode

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

Bases: PyQt5.QtWidgets.QListWidget

Pips pager

Constructors

  • PipsPager(parent: QWidget = None)

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

currentIndexChanged
visibleNumber
pageNumber
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)
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
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

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
addChild(child)

add child

Parameters

child: NavigationTreeWidgetBase

child item

text()
icon()
setText(text)
setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)
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

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

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

Bases: NavigationWidget

Avatar widget

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

Bases: PyQt5.QtWidgets.QFrame

Navigation panel

displayModeChanged
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

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

isCollapsed()
resizeEvent(e: PyQt5.QtGui.QResizeEvent)
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
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

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

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

selectedIcon()
setSelectedIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)
setSelectedTextVisible(isVisible)
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

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

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

buttons()
class Pivot(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Pivot

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

setCurrentItem(routeKey: str)

set current selected item

Parameters

routeKey: str

the unique name of item

setItemFontSize(size: int)

set the pixel font size of items

widget(routeKey: str)
resizeEvent(e) None
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

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)
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
spacing
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)
item(routeKey: str)
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)
class BreadcrumbItem(routeKey: str, text: str, index: int, parent=None)

Bases: BreadcrumbWidget

Breadcrumb item

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
date
dateFormat
getDate()
setDate(date: PyQt5.QtCore.QDate)

set the selected date

reset()

reset date

getDateFormat()
setDateFormat(format: PyQt5.QtCore.Qt.DateFormat | str)
paintEvent(e)
class DatePickerBase(parent=None)

Bases: qfluentwidgets.components.date_time.picker_base.PickerBase

Date picker base class

dateChanged
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()
class DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True)

Bases: DatePickerBase

Date picker

MM_DD_YYYY = 0
YYYY_MM_DD = 1
date
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

class ZhDatePicker(parent=None)

Bases: DatePicker

Chinese date picker

class PickerBase(parent=None)

Bases: PyQt5.QtWidgets.QPushButton

Picker base class

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

class PickerPanel(parent=None)

Bases: PyQt5.QtWidgets.QWidget

picker panel

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

add shadow to dialog

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

time
secondVisible
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()
class AMTimePicker(parent=None, showSeconds=False)

Bases: TimePickerBase

AM/PM time picker

time
secondVisible
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()