components¶
- date_time
- dialog_box
- layout
- material
- navigation
- settings
- widgets
- acrylic_label
- button
- card_widget
- check_box
- combo_box
- command_bar
- cycle_list_widget
- flip_view
- flyout
- frameless_window
- icon_widget
- info_badge
- info_bar
- label
- line_edit
- list_view
- menu
- model_combo_box
- pips_pager
- progress_bar
- progress_ring
- scroll_area
- scroll_bar
- separator
- slider
- spin_box
- stacked_widget
- state_tool_tip
- switch_button
- tab_view
- table_view
- teaching_tip
- tool_tip
- tree_view
Package Contents¶
Color dialog |
|
Dialog box |
|
Message box |
|
Folder list dialog box |
|
Win10 style message dialog box with a mask |
|
Message box base |
|
Dialog box base class with a mask |
|
Expand layout |
|
Flow layout |
|
Flow layout |
|
Vertical box layout |
|
Setting card |
|
Setting card with switch button |
|
Setting card with a slider |
|
Setting card with a push button |
|
Setting card with color picker |
|
Hyperlink card |
|
Push setting card with primary color |
|
Color picker button |
|
Setting card with a combo box |
|
Expandable setting card |
|
Expand group setting card |
|
Simple expand group setting card |
|
Folder list setting card |
|
setting card with a group of options |
|
Custom color setting card |
|
Setting card group |
|
Drop down push button |
|
Drop down tool button |
|
Primary color push button |
|
Push button |
|
Radio button |
|
Hyperlink button |
|
Tool button |
|
Transparent background tool button |
|
Toggle push button |
|
Split widget base class |
|
Split push button |
|
Split tool button |
|
Primary color tool button |
|
Primary split push button |
|
Primary split push button |
|
Primary color drop down push button |
|
Primary drop down tool button |
|
Toggle tool button |
|
Transparent push button |
|
Transparent toggle push button |
|
Transparent toggle tool button |
|
Transparent drop down push button |
|
Transparent drop down tool button |
|
Pill push button |
|
Pill push button |
|
Card widget |
|
Card widget with shadow effect |
|
Simple card widget |
|
Header card widget |
|
Group header card widget |
|
Check box |
|
Combo box |
|
Editable combo box |
|
Combo box build in data model |
|
Editable combo box build in data model |
|
Command bar |
|
Command button |
|
Command bar view |
|
Flip view |
|
Horizontal flip view |
|
Vertical flip view |
|
Flip view image delegate |
|
Line edit |
|
Text edit |
|
Plain text edit |
|
Line edit button |
|
Search line edit |
|
Password line edit |
|
Text browser |
|
Icon widget |
|
Label for high dpi pixmap |
|
Caption text label |
|
Strong body text label |
|
Body text label |
|
Subtitle text label |
|
Sub title text label |
|
Large title text label |
|
Display text label |
|
Fluent label base class |
|
Image label |
|
Avatar widget |
|
Hyperlink label |
|
List widget |
|
List view |
|
List item delegate |
|
A menu with DWM shadow |
|
Line edit menu |
|
Round corner menu |
|
Menu animation manager |
|
Menu animation type |
|
Menu item delegate with indicator |
|
Menu item delegate |
|
Shortcut key menu item delegate |
|
Checkable menu |
|
Menu indicator type |
|
System tray menu |
|
Checkable system tray menu |
|
Information bar |
|
Info bar icon |
|
Info bar position |
|
Info bar manager |
|
Information badge |
|
Info level |
|
Dot info badge |
|
Icon icon badge |
|
Info badge position |
|
Info badge manager |
|
Single direction scroll area |
|
Smooth mode |
|
Smooth scroll area |
|
Smooth scroll area |
|
A slider can be clicked |
|
Hollow handle style |
|
A slider can be clicked |
|
Spin box |
|
Double spin box |
|
Date edit |
|
Date time edit |
|
Time edit |
|
Compact spin box |
|
Compact double spin box |
|
Compact date edit |
|
Compact date time edit |
|
Compact time edit |
|
Stacked widget with pop up animation |
|
Stacked widget with fade in and fade out animation |
|
State tooltip |
|
Switch button class |
|
Indicator position |
|
Table view |
|
Table widget |
|
Tool tip |
|
Tool tip filter |
|
Info bar position |
|
Tree widget |
|
Tree view |
|
Tree item delegate |
|
Cycle list widget |
|
Indeterminate progress bar |
|
Progress ring |
|
Indeterminate progress ring |
|
Fluent scroll bar |
|
Smooth scroll bar |
|
Smooth scroll delegate |
|
Scroll bar handle display mode |
|
Teaching tip |
|
Teaching tip tail position |
|
Teaching tip view |
|
Pop up teaching tip |
|
Flyout view |
|
Flyout view base class |
|
Flyout |
|
Flyout animation type |
|
Flyout animation manager |
|
Tab bar |
|
Tab item |
|
Tab close button display mode |
|
Pips pager |
|
Vertical pips pager |
|
Horizontal pips pager |
|
Pips pager scroll button display mode |
|
Horizontal separator |
|
Vertical separator |
|
Navigation widget |
|
Navigation push button |
|
Navigation Separator |
|
Navigation tool button |
|
Navigation tree widget |
|
Navigation tree widget base class |
|
Avatar widget |
|
Navigation item header for grouping items |
|
Navigation user card widget |
|
Navigation panel |
|
Navigation item position |
|
Navigation display mode |
|
Navigation interface |
|
Navigation bar push button |
|
Pivot |
|
Pivot item |
|
Segmented item |
|
Segmented widget |
|
Pivot item |
|
Segmented tool widget |
|
Transparent background tool button |
|
Segmented toggle tool widget |
|
Breadcrumb bar |
|
Breadcrumb item |
|
Calendar picker |
|
Pro calendar picker |
|
Date picker base class |
|
Date picker |
|
Chinese date picker |
|
Picker base class |
|
picker panel |
|
Picker column formatter |
|
24 hours time picker |
|
AM/PM time picker |
- class ColorDialog(color, title: str, parent=None, enableAlpha=False)¶
Bases:
qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBaseColor dialog
- colorChanged¶
- enableAlpha = False¶
- oldColor¶
- color¶
- scrollArea¶
- scrollWidget¶
- buttonGroup¶
- yesButton¶
- cancelButton¶
- titleLabel¶
- huePanel¶
- newColorCard¶
- oldColorCard¶
- brightSlider¶
- editLabel¶
- redLabel¶
- blueLabel¶
- greenLabel¶
- opacityLabel¶
- hexLineEdit¶
- redLineEdit¶
- greenLineEdit¶
- blueLineEdit¶
- opacityLineEdit¶
- vBoxLayout¶
- setColor(color, movePicker=True)¶
set color
- updateStyle()¶
update style sheet
- showEvent(e)¶
fade in
- class Dialog(title: str, content: str, parent=None)¶
Bases:
qframelesswindow.FramelessDialog,Ui_MessageBoxDialog box
- yesSignal¶
- cancelSignal¶
- windowTitleLabel¶
- setTitleBarVisible(isVisible: bool)¶
- class MessageBox(title: str, content: str, parent=None)¶
Bases:
qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase,Ui_MessageBoxMessage 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.MaskDialogBaseFolder list dialog box
- folderChanged¶
- title¶
- content¶
- folderPaths¶
- vBoxLayout¶
- titleLabel¶
- contentLabel¶
- scrollArea¶
- scrollWidget¶
- completeButton¶
- addFolderCard¶
- folderCards¶
- class MessageDialog(title: str, content: str, parent)¶
Bases:
qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBaseWin10 style message dialog box with a mask
- yesSignal¶
- cancelSignal¶
- content¶
- titleLabel¶
- contentLabel¶
- yesButton¶
- cancelButton¶
- class MessageBoxBase(parent=None)¶
Bases:
qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBaseMessage box base
- buttonGroup¶
- yesButton¶
- cancelButton¶
- vBoxLayout¶
- viewLayout¶
- buttonLayout¶
- validate() bool¶
validate the data of form before closing dialog
Returns¶
- isValid: bool
whether the data of form is legal
- hideYesButton()¶
- hideCancelButton()¶
- class MaskDialogBase(parent=None)¶
Bases:
PyQt5.QtWidgets.QDialogDialog box base class with a mask
- windowMask¶
- widget¶
- setShadowEffect(blurRadius=60, offset=(0, 10), color=QColor(0, 0, 0, 100))¶
add shadow to dialog
- setMaskColor(color: PyQt5.QtGui.QColor)¶
set the color of mask
- showEvent(e)¶
fade in
- done(code)¶
fade out
- isClosableOnMaskClicked()¶
- setClosableOnMaskClicked(isClosable: bool)¶
- setDraggable(draggable: bool)¶
- isDraggable() bool¶
- resizeEvent(e)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- class ExpandLayout(parent=None)¶
Bases:
PyQt5.QtWidgets.QLayoutExpand 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.QLayoutFlow layout
- duration = 300¶
- ease¶
- needAni = False¶
- isTight = False¶
- addItem(item)¶
- insertItem(index, item)¶
- addWidget(w)¶
- insertWidget(index, w)¶
- setAnimation(duration, ease=QEasingCurve.Linear)¶
set the moving animation
Parameters¶
- duration: int
the duration of animation in milliseconds
- ease: QEasingCurve
the easing curve of animation
- count()¶
- itemAt(index: int)¶
- takeAt(index: int)¶
- removeWidget(widget)¶
- removeAllWidgets()¶
remove all widgets from layout
- takeAllWidgets()¶
remove all widgets from layout and delete them
- expandingDirections()¶
- hasHeightForWidth()¶
- heightForWidth(width: int)¶
get the minimal height according to width
- setGeometry(rect: PyQt5.QtCore.QRect)¶
- sizeHint()¶
- minimumSize()¶
- setVerticalSpacing(spacing: int)¶
set vertical spacing between widgets
- verticalSpacing()¶
get vertical spacing between widgets
- setHorizontalSpacing(spacing: int)¶
set horizontal spacing between widgets
- horizontalSpacing()¶
get horizontal spacing between widgets
- eventFilter(obj: PyQt5.QtCore.QObject, event: PyQt5.QtCore.QEvent) bool¶
- class AdaptiveFlowLayout(parent=None, needAni=False, isTight=False)¶
Bases:
FlowLayoutFlow layout
- setWidgetMinimumWidth(width: int)¶
- widgetMinimumWidth()¶
- setWidgetMaximumWidth(width)¶
- widgetMaximumWidth()¶
- class VBoxLayout(parent)¶
Bases:
PyQt5.QtWidgets.QVBoxLayoutVertical box layout
- widgets = []¶
- addWidgets(widgets: List[PyQt5.QtWidgets.QWidget], stretch=0, alignment=Qt.AlignTop)¶
add widgets to layout
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, alignment=Qt.AlignTop)¶
add widget to layout
- removeWidget(widget: PyQt5.QtWidgets.QWidget)¶
remove widget from layout but not delete it
- deleteWidget(widget: PyQt5.QtWidgets.QWidget)¶
remove widget from layout and delete it
- removeAllWidget()¶
remove all widgets from layout
- class SettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)¶
Bases:
PyQt5.QtWidgets.QFrameSetting card
- iconLabel¶
- titleLabel¶
- contentLabel¶
- hBoxLayout¶
- vBoxLayout¶
- setTitle(title: str)¶
set the title of card
- setContent(content: str)¶
set the content of card
- setValue(value)¶
set the value of config item
- setIconSize(width: int, height: int)¶
set the icon fixed size
- paintEvent(e)¶
- class SwitchSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, configItem: qfluentwidgets.common.config.ConfigItem = None, parent=None)¶
Bases:
SettingCardSetting card with switch button
- checkedChanged¶
- configItem = None¶
- switchButton¶
- setValue(isChecked: bool)¶
set the value of config item
- setChecked(isChecked: bool)¶
- isChecked()¶
- class RangeSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)¶
Bases:
SettingCardSetting card with a slider
- valueChanged¶
- configItem¶
- slider¶
- valueLabel¶
- setValue(value)¶
set the value of config item
- class PushSettingCard(text, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)¶
Bases:
SettingCardSetting card with a push button
- clicked¶
- button¶
- class ColorSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title: str, content: str = None, parent=None, enableAlpha=False)¶
Bases:
SettingCardSetting card with color picker
- colorChanged¶
- configItem¶
- colorPicker¶
- setValue(color: PyQt5.QtGui.QColor)¶
set the value of config item
- class HyperlinkCard(url, text, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, parent=None)¶
Bases:
SettingCardHyperlink card
- linkButton¶
- class PrimaryPushSettingCard(text, icon, title, content=None, parent=None)¶
Bases:
PushSettingCardPush setting card with primary color
- class ColorPickerButton(color: PyQt5.QtGui.QColor, title: str, parent=None, enableAlpha=False)¶
Bases:
PyQt5.QtWidgets.QToolButtonColor picker button
- colorChanged¶
- title¶
- enableAlpha = False¶
- setColor(color)¶
set color
- paintEvent(e)¶
- class ComboBoxSettingCard(configItem: qfluentwidgets.common.config.OptionsConfigItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, texts=None, parent=None)¶
Bases:
SettingCardSetting card with a combo box
- configItem¶
- comboBox¶
- optionToText¶
- setValue(value)¶
set the value of config item
- class ExpandSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)¶
Bases:
PyQt5.QtWidgets.QScrollAreaExpandable setting card
- isExpand = False¶
- scrollWidget¶
- view¶
- card¶
- scrollLayout¶
- viewLayout¶
- spaceWidget¶
- borderWidget¶
- expandAni¶
- addWidget(widget: PyQt5.QtWidgets.QWidget)¶
add widget to tail
- wheelEvent(e)¶
- setExpand(isExpand: bool)¶
set the expand status of card
- toggleExpand()¶
toggle expand status
- resizeEvent(e)¶
- setValue(value)¶
set the value of config item
- class ExpandGroupSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)¶
Bases:
ExpandSettingCardExpand group setting card
- widgets: List[PyQt5.QtWidgets.QWidget] = []¶
- addGroupWidget(widget: PyQt5.QtWidgets.QWidget)¶
add widget to group
- addGroup(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) GroupWidget¶
add group
Parameters¶
- icon: str | QIcon | FluentIconBase
the icon of group
- title: str
the title of group
- content: str
the description of group
- widget: str
the widget of group
- stretch: int
the stretch of widget
- removeGroupWidget(widget: PyQt5.QtWidgets.QWidget)¶
remove a group from card
- class SimpleExpandGroupSettingCard(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, title: str, content: str = None, parent=None)¶
Bases:
ExpandGroupSettingCardSimple expand group setting card
- class FolderListSettingCard(configItem: qfluentwidgets.common.config.ConfigItem, title: str, content: str = None, directory='./', parent=None)¶
Bases:
qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCardFolder list setting card
- folderChanged¶
- configItem¶
- addFolderButton¶
- folders: List[str]¶
- class OptionsSettingCard(configItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title, content=None, texts=None, parent=None)¶
Bases:
qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCardsetting card with a group of options
- optionChanged¶
- texts = []¶
- configItem¶
- configName¶
- choiceLabel¶
- buttonGroup¶
- setValue(value)¶
select button according to the value
- class CustomColorSettingCard(configItem: qfluentwidgets.common.config.ColorConfigItem, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, title: str, content=None, parent=None, enableAlpha=False)¶
Bases:
qfluentwidgets.components.settings.expand_setting_card.ExpandGroupSettingCardCustom color setting card
- colorChanged¶
- enableAlpha = False¶
- configItem¶
- defaultColor¶
- customColor¶
- choiceLabel¶
- radioWidget¶
- radioLayout¶
- defaultRadioButton¶
- customRadioButton¶
- buttonGroup¶
- customColorWidget¶
- customColorLayout¶
- customLabel¶
- chooseColorButton¶
- class SettingCardGroup(title: str, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetSetting card group
- titleLabel¶
- vBoxLayout¶
- cardLayout¶
- addSettingCard(card: PyQt5.QtWidgets.QWidget)¶
add setting card to group
- addSettingCards(cards: List[PyQt5.QtWidgets.QWidget])¶
add setting cards to group
- adjustSize()¶
- class DropDownPushButton(*args, **kwargs)¶
Bases:
DropDownButtonBase,PushButtonDrop 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,ToolButtonDrop 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:
PushButtonPrimary 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.QPushButtonPush button
Constructors¶
PushButton(parent: QWidget = None)
PushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)
PushButton(icon: QIcon | FluentIcon, text: str, parent: QWidget = None)
- isPressed = False¶
- isHover = False¶
- setIcon(icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase)¶
- icon()¶
- setProperty(name: str, value) bool¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- paintEvent(e)¶
- class RadioButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PyQt5.QtWidgets.QRadioButtonRadio button
Constructors¶
RadioButton(parent: QWidget = None)
- RadioButton(url: text, text: str, parent: QWidget = None,
icon: QIcon | str | FluentIconBase = None)
- lightIndicatorColor¶
- darkIndicatorColor¶
- indicatorPos¶
- isHover = False¶
- enterEvent(e)¶
- leaveEvent(e)¶
- paintEvent(e)¶
- textColor()¶
- getLightTextColor() PyQt5.QtGui.QColor¶
- getDarkTextColor() PyQt5.QtGui.QColor¶
- setLightTextColor(color: PyQt5.QtGui.QColor)¶
- setDarkTextColor(color: PyQt5.QtGui.QColor)¶
- setIndicatorColor(light, dark)¶
- setTextColor(light, dark)¶
- lightTextColor¶
- darkTextColor¶
- class HyperlinkButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PushButtonHyperlink button
Constructors¶
HyperlinkButton(parent: QWidget = None)
HyperlinkButton(url: str, text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)
HyperlinkButton(icon: QIcon | FluentIconBase, url: str, text: str, parent: QWidget = None)
- getUrl()¶
- setUrl(url: str | PyQt5.QtCore.QUrl)¶
- url¶
- class ToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PyQt5.QtWidgets.QToolButtonTool button
Constructors¶
ToolButton(parent: QWidget = None)
ToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- isPressed = False¶
- isHover = False¶
- setIcon(icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase)¶
- icon()¶
- setProperty(name: str, value) bool¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- paintEvent(e)¶
- class TransparentToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
ToolButtonTransparent background tool button
Constructors¶
TransparentToolButton(parent: QWidget = None)
TransparentToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- class ToggleButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PushButtonToggle 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.QWidgetSplit widget base class
- dropDownClicked¶
- flyout: PyQt5.QtWidgets.QWidget = None¶
- dropButton¶
- hBoxLayout¶
- setWidget(widget: PyQt5.QtWidgets.QWidget)¶
set the widget on left side
- setDropButton(button)¶
set drop dow button
- setDropIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)¶
set the icon of drop down button
- setDropIconSize(size: PyQt5.QtCore.QSize)¶
set the icon size of drop down button
- setFlyout(flyout)¶
set the widget pops up when drop down button is clicked
Parameters¶
- flyout: QWidget
the widget pops up when drop down button is clicked. It should contain exec(pos: QPoint) method
- showFlyout()¶
show flyout
- class SplitPushButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
SplitWidgetBaseSplit push button
Constructors¶
SplitPushButton(parent: QWidget = None)
SplitPushButton(text: str, parent: QWidget = None, icon: QIcon | str | FluentIconBase = None)
- clicked¶
- button¶
- text()¶
- setText(text: str)¶
- icon()¶
- setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)¶
- setIconSize(size: PyQt5.QtCore.QSize)¶
- text_¶
- icon_¶
- class SplitToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
SplitWidgetBaseSplit tool button
Constructors¶
SplitToolButton(parent: QWidget = None)
SplitToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- clicked¶
- button¶
- icon()¶
- setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)¶
- setIconSize(size: PyQt5.QtCore.QSize)¶
- icon_¶
- class PrimaryToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
ToolButtonPrimary color tool button
Constructors¶
PrimaryToolButton(parent: QWidget = None)
PrimaryToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- class PrimarySplitPushButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
SplitPushButtonPrimary 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:
SplitToolButtonPrimary split push button
Constructors¶
PrimarySplitToolButton(parent: QWidget = None)
PrimarySplitToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- class PrimaryDropDownPushButton(*args, **kwargs)¶
Bases:
PrimaryDropDownButtonBase,PrimaryPushButtonPrimary 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,PrimaryToolButtonPrimary 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:
ToolButtonToggle tool button
Constructors¶
ToggleToolButton(parent: QWidget = None)
ToggleToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- class TransparentPushButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PushButtonTransparent 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:
TogglePushButtonTransparent toggle push button
Constructors¶
TransparentTogglePushButton(parent: QWidget = None)
- TransparentTogglePushButton(text: str, parent: QWidget = None,
icon: QIcon | str | FluentIconBase = None)
TransparentTogglePushButton(icon: QIcon | FluentIconBase, text: str, parent: QWidget = None)
- class TransparentToggleToolButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
ToggleToolButtonTransparent toggle tool button
Constructors¶
TransparentToggleToolButton(parent: QWidget = None)
TransparentToggleToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- class TransparentDropDownPushButton(*args, **kwargs)¶
Bases:
DropDownPushButtonTransparent 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:
DropDownToolButtonTransparent 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,PillButtonBasePill 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,PillButtonBasePill 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.QFrameCard widget
- clicked¶
- mouseReleaseEvent(e)¶
- setClickEnabled(isEnabled: bool)¶
- isClickEnabled()¶
- getBorderRadius()¶
- setBorderRadius(radius: int)¶
- paintEvent(e)¶
- borderRadius¶
- class ElevatedCardWidget(parent=None)¶
Bases:
SimpleCardWidgetCard widget with shadow effect
- shadowAni¶
- elevatedAni¶
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- class SimpleCardWidget(parent=None)¶
Bases:
CardWidgetSimple card widget
- paintEvent(e)¶
- class HeaderCardWidget(parent=None)¶
Bases:
SimpleCardWidgetHeader card widget
- headerView¶
- headerLabel¶
- separator¶
- view¶
- vBoxLayout¶
- headerLayout¶
- viewLayout¶
- getTitle()¶
- setTitle(title: str)¶
- title¶
- class CardGroupWidget(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon, title: str, content: str, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidget- vBoxLayout¶
- hBoxLayout¶
- iconWidget¶
- titleLabel¶
- contentLabel¶
- textLayout¶
- separator¶
- title()¶
- setTitle(text: str)¶
- content()¶
- setContent(text: str)¶
- icon()¶
- setIcon(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon)¶
- setIconSize(size: PyQt5.QtCore.QSize)¶
- setSeparatorVisible(isVisible: bool)¶
- isSeparatorVisible()¶
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0)¶
- class GroupHeaderCardWidget(parent=None)¶
Bases:
HeaderCardWidgetGroup header card widget
- addGroup(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon, title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) CardGroupWidget¶
add widget to a new group
Parameters¶
- icon: str | QIcon | FluentIconBase
the icon to be drawn
- title: str
the title of card
- content: str
the content of card
- widget: QWidget
the widget to be added
- stretch: int
the layout stretch of widget
- groupCount()¶
- class CheckBox(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PyQt5.QtWidgets.QCheckBoxCheck box
Constructors¶
CheckBox(parent: QWidget = None)
CheckBox(text: str, parent: QWidget = None)
- isPressed = False¶
- isHover = False¶
- lightCheckedColor¶
- darkCheckedColor¶
- lightTextColor¶
- darkTextColor¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- setCheckedColor(light, dark)¶
set the color of indicator in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
indicator color in light/dark theme mode
- setTextColor(light, dark)¶
set the color of text
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
text color in light/dark theme mode
- paintEvent(e)¶
- class ComboBox(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButton,ComboBoxBaseCombo box
- currentIndexChanged¶
- currentTextChanged¶
- activated¶
- textActivated¶
- arrowAni¶
- setPlaceholderText(text: str)¶
- mouseReleaseEvent(e)¶
- paintEvent(e)¶
- class EditableComboBox(parent=None)¶
Bases:
qfluentwidgets.components.widgets.line_edit.LineEdit,ComboBoxBaseEditable combo box
- currentIndexChanged¶
- currentTextChanged¶
- activated¶
- textActivated¶
- dropButton¶
- currentText()¶
- clear()¶
Clears the combobox, removing all items.
- setPlaceholderText(text: str)¶
- class ModelComboBox(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButton,ModelComboBoxBaseCombo box build in data model
- currentIndexChanged¶
- currentTextChanged¶
- activated¶
- textActivated¶
- arrowAni¶
- setIconVisible(isVisible: bool)¶
- isIconVisible()¶
- setPlaceholderText(text: str)¶
- clear()¶
Clears the combobox, removing all items.
- setItemIcon(index, icon)¶
Sets the data role for the item on the given index
- mouseReleaseEvent(e)¶
- paintEvent(e)¶
- class EditableModelComboBox(parent=None)¶
Bases:
qfluentwidgets.components.widgets.line_edit.LineEdit,ModelComboBoxBaseEditable combo box build in data model
- currentIndexChanged¶
- currentTextChanged¶
- activated¶
- textActivated¶
- dropButton¶
- currentText()¶
- clear()¶
Clears the combobox, removing all items.
- setPlaceholderText(text: str)¶
- class CommandBar(parent=None)¶
Bases:
PyQt5.QtWidgets.QFrameCommand bar
- moreButton¶
- setSpaing(spacing: int)¶
- spacing()¶
- addActions(actions: Iterable[PyQt5.QtWidgets.QAction])¶
- addHiddenAction(action: PyQt5.QtWidgets.QAction)¶
add hidden action
- addHiddenActions(actions: List[PyQt5.QtWidgets.QAction])¶
add hidden action
- insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction)¶
- addSeparator()¶
- insertSeparator(index: int)¶
- addWidget(widget: PyQt5.QtWidgets.QWidget)¶
add widget to command bar
- removeAction(action: PyQt5.QtWidgets.QAction)¶
- removeWidget(widget: PyQt5.QtWidgets.QWidget)¶
- removeHiddenAction(action: PyQt5.QtWidgets.QAction)¶
- setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle)¶
set the style of tool button
- toolButtonStyle()¶
- setButtonTight(isTight: bool)¶
- isButtonTight()¶
- setIconSize(size: PyQt5.QtCore.QSize)¶
- iconSize()¶
- resizeEvent(e)¶
- minimumSizeHint() PyQt5.QtCore.QSize¶
- updateGeometry()¶
- suitableWidth()¶
- resizeToSuitableWidth()¶
- setFont(font: PyQt5.QtGui.QFont)¶
- property commandButtons¶
- setMenuDropDown(down: bool)¶
set the animation direction of more actions menu
- isMenuDropDown()¶
- class CommandButton(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.TransparentToggleToolButtonCommand 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.FlyoutViewBaseCommand bar view
- bar¶
- hBoxLayout¶
- setMenuVisible(isVisible)¶
- addWidget(widget: PyQt5.QtWidgets.QWidget)¶
- setSpaing(spacing: int)¶
- spacing()¶
- addAction(action: PyQt5.QtWidgets.QAction)¶
- addActions(actions: Iterable[PyQt5.QtWidgets.QAction])¶
- addHiddenAction(action: PyQt5.QtWidgets.QAction)¶
- addHiddenActions(actions: List[PyQt5.QtWidgets.QAction])¶
- insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction)¶
- addSeparator()¶
- insertSeparator(index: int)¶
- removeAction(action: PyQt5.QtWidgets.QAction)¶
- removeWidget(widget: PyQt5.QtWidgets.QWidget)¶
- removeHiddenAction(action: PyQt5.QtWidgets.QAction)¶
- setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle)¶
- toolButtonStyle()¶
- setButtonTight(isTight: bool)¶
- isButtonTight()¶
- setIconSize(size: PyQt5.QtCore.QSize)¶
- iconSize()¶
- setFont(font: PyQt5.QtGui.QFont)¶
- setMenuDropDown(down: bool)¶
- suitableWidth()¶
- resizeToSuitableWidth()¶
- actions()¶
- paintEvent(e)¶
- class FlipView(parent=None)¶
Bases:
PyQt5.QtWidgets.QListWidgetFlip view
Constructors¶
FlipView(parent: QWidget = None)
FlipView(orient: Qt.Orientation, parent: QWidget = None)
- currentIndexChanged¶
- orientation¶
- isHorizontal()¶
- setItemSize(size: PyQt5.QtCore.QSize)¶
set the size of item
- getItemSize()¶
get the size of item
- setBorderRadius(radius: int)¶
set the border radius of item
- getBorderRadius()¶
- scrollPrevious()¶
scroll to previous item
- scrollNext()¶
scroll to next item
- setCurrentIndex(index: int)¶
set current index
- scrollToIndex(index)¶
- currentIndex()¶
- image(index: int)¶
- addImage(image: PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str)¶
add image
- addImages(images: List[PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str], targetSize: PyQt5.QtCore.QSize = None)¶
add images
- setItemImage(index: int, image: PyQt5.QtGui.QImage | PyQt5.QtGui.QPixmap | str, targetSize: PyQt5.QtCore.QSize = None)¶
set the image of specified item
- itemImage(index: int, load=True) PyQt5.QtGui.QImage¶
get the image of specified item
Parameters¶
- index: int
the index of image
- load: bool
whether to load image data
- resizeEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- showEvent(e)¶
- wheelEvent(e: PyQt5.QtGui.QWheelEvent)¶
- getAspectRatioMode()¶
- setAspectRatioMode(mode: PyQt5.QtCore.Qt.AspectRatioMode)¶
- itemSize¶
- borderRadius¶
- aspectRatioMode¶
- class FlipImageDelegate(parent=None)¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegateFlip view image delegate
- borderRadius = 0¶
- itemSize(index: int)¶
- setBorderRadius(radius: int)¶
- paint(painter: PyQt5.QtGui.QPainter, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)¶
- class LineEdit(parent=None)¶
Bases:
PyQt5.QtWidgets.QLineEditLine edit
- lightFocusedBorderColor¶
- darkFocusedBorderColor¶
- leftButtons: List[LineEditButton] = []¶
- rightButtons: List[LineEditButton] = []¶
- hBoxLayout¶
- clearButton¶
- isError()¶
- setError(isError: bool)¶
set the error status
- setCustomFocusedBorderColor(light, dark)¶
set the border color in focused status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
border color in light/dark theme mode
- focusedBorderColor()¶
- setClearButtonEnabled(enable: bool)¶
- isClearButtonEnabled() bool¶
- setCompleter(completer: PyQt5.QtWidgets.QCompleter)¶
- completer()¶
- addAction(action: PyQt5.QtWidgets.QAction, position=QLineEdit.ActionPosition.TrailingPosition)¶
- addActions(actions, position=QLineEdit.ActionPosition.TrailingPosition)¶
- focusOutEvent(e)¶
- focusInEvent(e)¶
- contextMenuEvent(e)¶
- paintEvent(e)¶
- class TextEdit(parent=None)¶
Bases:
PyQt5.QtWidgets.QTextEditText edit
- layer¶
- scrollDelegate¶
- contextMenuEvent(e)¶
- class PlainTextEdit(parent=None)¶
Bases:
PyQt5.QtWidgets.QPlainTextEditPlain text edit
- layer¶
- scrollDelegate¶
- contextMenuEvent(e)¶
- class LineEditButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, parent=None)¶
Bases:
PyQt5.QtWidgets.QToolButtonLine edit button
- isPressed = False¶
- setAction(action: PyQt5.QtWidgets.QAction)¶
- action()¶
- setIcon(icon: str | qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon)¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- paintEvent(e)¶
- class SearchLineEdit(parent=None)¶
Bases:
LineEditSearch line edit
- searchSignal¶
- clearSignal¶
- searchButton¶
- search()¶
emit search signal
- setClearButtonEnabled(enable: bool)¶
- class PasswordLineEdit(parent=None)¶
Bases:
LineEditPassword line edit
- viewButton¶
- setPasswordVisible(isVisible: bool)¶
set the visibility of password
- isPasswordVisible()¶
- setClearButtonEnabled(enable: bool)¶
- setViewPasswordButtonVisible(isVisible: bool)¶
set the visibility of view password button
- eventFilter(obj, e)¶
- inputMethodQuery(query: PyQt5.QtCore.Qt.InputMethodQuery)¶
- passwordVisible¶
- class TextBrowser(parent=None)¶
Bases:
PyQt5.QtWidgets.QTextBrowserText browser
- layer¶
- scrollDelegate¶
- contextMenuEvent(e)¶
- class IconWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetIcon widget
Constructors¶
IconWidget(parent: QWidget = None)
IconWidget(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- getIcon()¶
- setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)¶
- paintEvent(e)¶
- icon¶
- class PixmapLabel(parent=None)¶
Bases:
PyQt5.QtWidgets.QLabelLabel for high dpi pixmap
- setPixmap(pixmap: PyQt5.QtGui.QPixmap)¶
- pixmap()¶
- paintEvent(e)¶
- class CaptionLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseCaption text label
Constructors¶
CaptionLabel(parent: QWidget = None)
CaptionLabel(text: str, parent: QWidget = None)
- getFont()¶
- class StrongBodyLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseStrong body text label
Constructors¶
StrongBodyLabel(parent: QWidget = None)
StrongBodyLabel(text: str, parent: QWidget = None)
- getFont()¶
- class BodyLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseBody text label
Constructors¶
BodyLabel(parent: QWidget = None)
BodyLabel(text: str, parent: QWidget = None)
- getFont()¶
- class SubtitleLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseSubtitle text label
Constructors¶
SubtitleLabel(parent: QWidget = None)
SubtitleLabel(text: str, parent: QWidget = None)
- getFont()¶
- class TitleLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseSub title text label
Constructors¶
TitleLabel(parent: QWidget = None)
TitleLabel(text: str, parent: QWidget = None)
- getFont()¶
- class LargeTitleLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseLarge title text label
Constructors¶
LargeTitleLabel(parent: QWidget = None)
LargeTitleLabel(text: str, parent: QWidget = None)
- getFont()¶
- class DisplayLabel(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
FluentLabelBaseDisplay text label
Constructors¶
DisplayLabel(parent: QWidget = None)
DisplayLabel(text: str, parent: QWidget = None)
- getFont()¶
- class FluentLabelBase(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PyQt5.QtWidgets.QLabelFluent 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.QLabelImage label
Constructors¶
ImageLabel(parent: QWidget = None)
ImageLabel(image: str | QImage | QPixmap, parent: QWidget = None)
- clicked¶
- image¶
- setBorderRadius(topLeft: int, topRight: int, bottomLeft: int, bottomRight: int)¶
set the border radius of image
- setImage(image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None)¶
set the image of label
- scaledToWidth(width: int)¶
- scaledToHeight(height: int)¶
- setScaledSize(size: PyQt5.QtCore.QSize)¶
- isNull()¶
- mouseReleaseEvent(e)¶
- setPixmap(pixmap: PyQt5.QtGui.QPixmap)¶
- pixmap() PyQt5.QtGui.QPixmap¶
- setMovie(movie: PyQt5.QtGui.QMovie)¶
- paintEvent(e)¶
- topLeftRadius()¶
- topRightRadius()¶
- bottomLeftRadius()¶
- bottomRightRadius()¶
- class AvatarWidget(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
ImageLabelAvatar widget
Constructors¶
AvatarWidget(parent: QWidget = None)
AvatarWidget(image: str | QImage | QPixmap, parent: QWidget = None)
- getRadius()¶
- setRadius(radius: int)¶
- setImage(image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None)¶
set the image of label
- setBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)¶
- paintEvent(e)¶
- radius¶
- class HyperlinkLabel(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonHyperlink label
Constructors¶
HyperlinkLabel(parent: QWidget = None)
HyperlinkLabel(text: str, parent: QWidget = None)
HyperlinkLabel(url: QUrl, parent: QWidget = None)
- getUrl() PyQt5.QtCore.QUrl¶
- setUrl(url: PyQt5.QtCore.QUrl | str)¶
- isUnderlineVisible()¶
- setUnderlineVisible(isVisible: bool)¶
- url¶
- underlineVisible¶
- class ListWidget(parent=None)¶
Bases:
ListBase,PyQt5.QtWidgets.QListWidgetList widget
- setCurrentItem(item: PyQt5.QtWidgets.QListWidgetItem, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)¶
- setCurrentRow(row: int, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)¶
- isSelectRightClickedRow()¶
- setSelectRightClickedRow(isSelect: bool)¶
- selectRightClickedRow¶
- class ListView(parent=None)¶
Bases:
ListBase,PyQt5.QtWidgets.QListViewList view
- isSelectRightClickedRow()¶
- setSelectRightClickedRow(isSelect: bool)¶
- selectRightClickedRow¶
- class ListItemDelegate(parent: PyQt5.QtWidgets.QListView)¶
Bases:
qfluentwidgets.components.widgets.table_view.TableItemDelegateList item delegate
- class DWMMenu(title='', parent=None)¶
Bases:
PyQt5.QtWidgets.QMenuA menu with DWM shadow
- windowEffect¶
- event(e: PyQt5.QtCore.QEvent)¶
- class LineEditMenu(parent: PyQt5.QtWidgets.QLineEdit)¶
Bases:
EditMenuLine edit menu
- selectionStart¶
- selectionLength¶
- class RoundMenu(title='', parent=None)¶
Bases:
PyQt5.QtWidgets.QMenuRound corner menu
- closedSignal¶
- isSubMenu = False¶
- parentMenu = None¶
- lastHoverItem = None¶
- lastHoverSubMenuItem = None¶
- isHideBySystem = True¶
- itemHeight = 28¶
- hBoxLayout¶
- view¶
- aniManager = None¶
- timer¶
- setMaxVisibleItems(num: int)¶
set the maximum visible items
- setItemHeight(height)¶
set the height of menu item
- setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))¶
add shadow to dialog
- adjustSize()¶
- icon()¶
- title()¶
- clear()¶
clear all actions
- setIcon(icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase)¶
set the icon of menu
- setTitle(title: str)¶
- addAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)¶
add action to menu
Parameters¶
- action: QAction
menu action
- addWidget(widget: PyQt5.QtWidgets.QWidget, selectable=True, onClick=None)¶
add custom widget
Parameters¶
- widget: QWidget
custom widget
- selectable: bool
whether the menu item is selectable
- onClick: callable
the slot connected to item clicked signal
- insertAction(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)¶
inserts action to menu, before the action before
- addActions(actions: List[PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action])¶
add actions to menu
Parameters¶
- actions: Iterable[QAction]
menu actions
- insertActions(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, actions: List[PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action])¶
inserts the actions actions to menu, before the action before
- removeAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)¶
remove action from menu
- removeMenu(menu)¶
remove submenu
- setDefaultAction(action: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action)¶
set the default action
- insertMenu(before: PyQt5.QtWidgets.QAction | qfluentwidgets.common.icon.Action, menu)¶
insert menu before action before
- addSeparator()¶
add seperator to menu
- hideEvent(e)¶
- closeEvent(e)¶
- 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.QObjectMenu animation manager
- managers¶
- ani¶
- availableViewSize(pos: PyQt5.QtCore.QPoint)¶
Return the available size of view
- exec(pos: PyQt5.QtCore.QPoint)¶
- classmethod register(name)¶
register menu animation manager
Parameters¶
- name: Any
the name of manager, it should be unique
- classmethod make(menu: RoundMenu, aniType: MenuAnimationType)¶
- class MenuAnimationType¶
Bases:
enum.EnumMenu animation type
- NONE = 0¶
- DROP_DOWN = 1¶
- PULL_UP = 2¶
- FADE_IN_DROP_DOWN = 3¶
- FADE_IN_PULL_UP = 4¶
- class IndicatorMenuItemDelegate(parent=None)¶
Bases:
MenuItemDelegateMenu item delegate with indicator
- paint(painter: PyQt5.QtGui.QPainter, option, index)¶
- class MenuItemDelegate(parent=None)¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegateMenu item delegate
- tooltipDelegate = None¶
- paint(painter, option, index)¶
- helpEvent(event, view, option, index)¶
- class ShortcutMenuItemDelegate(parent=None)¶
Bases:
MenuItemDelegateShortcut 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:
RoundMenuCheckable menu
- class SystemTrayMenu(title='', parent=None)¶
Bases:
RoundMenuSystem tray menu
- sizeHint() PyQt5.QtCore.QSize¶
- class CheckableSystemTrayMenu(title='', parent=None, indicatorType=MenuIndicatorType.CHECK)¶
Bases:
CheckableMenuCheckable 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.QFrameInformation bar
- closedSignal¶
- title¶
- content¶
- orient¶
- icon¶
- duration = 1000¶
- isClosable = True¶
- position¶
- titleLabel¶
- contentLabel¶
- closeButton¶
- iconWidget¶
- hBoxLayout¶
- textLayout¶
- widgetLayout¶
- opacityEffect¶
- opacityAni¶
- lightBackgroundColor = None¶
- darkBackgroundColor = None¶
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0)¶
add widget to info bar
- setCustomBackgroundColor(light, dark)¶
set the custom background color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
background color in light/dark theme mode
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- closeEvent(e)¶
- showEvent(e)¶
- paintEvent(e)¶
- classmethod new(icon, title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)¶
- classmethod info(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)¶
- classmethod success(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)¶
- classmethod warning(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)¶
- classmethod error(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None)¶
- classmethod desktopView()¶
Returns the desktop container
- class InfoBarIcon¶
Bases:
qfluentwidgets.common.icon.FluentIconBase,enum.EnumInfo bar icon
- INFORMATION = 'Info'¶
- SUCCESS = 'Success'¶
- WARNING = 'Warning'¶
- ERROR = 'Error'¶
- class InfoBarPosition¶
Bases:
enum.EnumInfo 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.QObjectInfo bar manager
- managers¶
- spacing = 16¶
- margin = 24¶
- infoBars¶
- aniGroups¶
- slideAnis = []¶
- dropAnis = []¶
- 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.QLabelInformation badge
Constructors¶
InfoBadge(parent: QWidget = None, `level`=InfoLevel.ATTENTION)
InfoBadge(text: str, parent: QWidget = None, `level`=InfoLevel.ATTENTION)
InfoBadge(num: int, parent: QWidget = None, `level`=InfoLevel.ATTENTION)
InfoBadge(num: float, parent: QWidget = None, `level`=InfoLevel.ATTENTION)
- level¶
- lightBackgroundColor = None¶
- darkBackgroundColor = None¶
- manager: InfoBadgeManager = None¶
- 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.EnumInfo level
- INFOAMTION = 'Info'¶
- SUCCESS = 'Success'¶
- ATTENTION = 'Attension'¶
- WARNING = 'Warning'¶
- ERROR = 'Error'¶
- class DotInfoBadge(parent=None, level=InfoLevel.ATTENTION)¶
Bases:
InfoBadgeDot 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:
InfoBadgeIcon 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.EnumInfo 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.QObjectInfo badge manager
- managers¶
- target¶
- badge¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- classmethod register(name)¶
register menu animation manager
Parameters¶
- name: Any
the name of manager, it should be unique
- classmethod make(position: InfoBadgePosition, target: PyQt5.QtWidgets.QWidget, badge: InfoBadge)¶
mask info badge manager
- position()¶
return the position of info badge
- class SingleDirectionScrollArea(parent=None, orient=Qt.Vertical)¶
Bases:
PyQt5.QtWidgets.QScrollAreaSingle direction scroll area
- orient¶
- smoothScroll¶
- vScrollBar¶
- hScrollBar¶
- setVerticalScrollBarPolicy(policy)¶
- setHorizontalScrollBarPolicy(policy)¶
- keyPressEvent(e)¶
- wheelEvent(e: PyQt5.QtGui.QWheelEvent)¶
- enableTransparentBackground()¶
- class SmoothMode¶
Bases:
enum.EnumSmooth mode
- NO_SMOOTH = 0¶
- CONSTANT = 1¶
- LINEAR = 2¶
- QUADRATI = 3¶
- COSINE = 4¶
- class SmoothScrollArea(parent=None)¶
Bases:
PyQt5.QtWidgets.QScrollAreaSmooth scroll area
- delegate¶
- setScrollAnimation(orient, duration, easing=QEasingCurve.OutCubic)¶
set scroll animation
Parameters¶
- orient: Orient
scroll orientation
- duration: int
scroll duration
- easing: QEasingCurve
animation type
- enableTransparentBackground()¶
- class ScrollArea(parent=None)¶
Bases:
PyQt5.QtWidgets.QScrollAreaSmooth scroll area
- scrollDelagate¶
- setSmoothMode(mode: qfluentwidgets.common.smooth_scroll.SmoothMode, orientation: PyQt5.QtCore.Qt.Orientation)¶
set smooth mode
Parameters¶
- mode: SmoothMode
smooth scroll mode
- orientation: Qt.Orientation
scroll direction
- enableTransparentBackground()¶
- class Slider(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
PyQt5.QtWidgets.QSliderA slider can be clicked
Constructors¶
Slider(parent: QWidget = None)
Slider(orient: Qt.Orientation, parent: QWidget = None)
- clicked¶
- setThemeColor(light, dark)¶
- setOrientation(orientation: PyQt5.QtCore.Qt.Orientation) None¶
- mousePressEvent(e: PyQt5.QtGui.QMouseEvent)¶
- mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)¶
- property grooveLength¶
- paintEvent(e)¶
- resizeEvent(e)¶
- class HollowHandleStyle(config: dict = None)¶
Bases:
PyQt5.QtWidgets.QProxyStyleHollow handle style
- config¶
- subControlRect(cc: PyQt5.QtWidgets.QStyle.ComplexControl, opt: PyQt5.QtWidgets.QStyleOptionSlider, sc: PyQt5.QtWidgets.QStyle.SubControl, widget: PyQt5.QtWidgets.QWidget)¶
get the rectangular area occupied by the sub control
- drawComplexControl(cc: PyQt5.QtWidgets.QStyle.ComplexControl, opt: PyQt5.QtWidgets.QStyleOptionSlider, painter: PyQt5.QtGui.QPainter, widget: PyQt5.QtWidgets.QWidget)¶
draw sub control
- class ClickableSlider¶
Bases:
PyQt5.QtWidgets.QSliderA slider can be clicked
- clicked¶
- mousePressEvent(e: PyQt5.QtGui.QMouseEvent)¶
- class SpinBox(parent=None)¶
Bases:
InlineSpinBoxBase,PyQt5.QtWidgets.QSpinBoxSpin box
- class DoubleSpinBox(parent=None)¶
Bases:
InlineSpinBoxBase,PyQt5.QtWidgets.QDoubleSpinBoxDouble spin box
- class DateEdit(parent=None)¶
Bases:
InlineSpinBoxBase,PyQt5.QtWidgets.QDateEditDate edit
- class DateTimeEdit(parent=None)¶
Bases:
InlineSpinBoxBase,PyQt5.QtWidgets.QDateTimeEditDate time edit
- class TimeEdit(parent=None)¶
Bases:
InlineSpinBoxBase,PyQt5.QtWidgets.QTimeEditTime edit
- class CompactSpinBox(parent=None)¶
Bases:
CompactSpinBoxBase,PyQt5.QtWidgets.QSpinBoxCompact spin box
- class CompactDoubleSpinBox(parent=None)¶
Bases:
CompactSpinBoxBase,PyQt5.QtWidgets.QDoubleSpinBoxCompact double spin box
- class CompactDateEdit(parent=None)¶
Bases:
CompactSpinBoxBase,PyQt5.QtWidgets.QDateEditCompact date edit
- class CompactDateTimeEdit(parent=None)¶
Bases:
CompactSpinBoxBase,PyQt5.QtWidgets.QDateTimeEditCompact date time edit
- class CompactTimeEdit(parent=None)¶
Bases:
CompactSpinBoxBase,PyQt5.QtWidgets.QTimeEditCompact time edit
- class PopUpAniStackedWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QStackedWidgetStacked widget with pop up animation
- aniFinished¶
- aniStart¶
- aniInfos: List[PopUpAniInfo] = []¶
- isAnimationEnabled = True¶
- addWidget(widget, deltaX=0, deltaY=76)¶
add widget to window
Parameters¶
- widget:
widget to be added
- deltaX: int
the x-axis offset from the beginning to the end of animation
- deltaY: int
the y-axis offset from the beginning to the end of animation
- removeWidget(widget: PyQt5.QtWidgets.QWidget)¶
- setAnimationEnabled(isEnabled: bool)¶
set whether the pop animation is enabled
- setCurrentIndex(index: int, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)¶
set current window to display
Parameters¶
- index: int
the index of widget to display
- isNeedPopOut: bool
need pop up animation or not
- showNextWidgetDirectly: bool
whether to show next widget directly when animation started
- duration: int
animation duration
- easingCurve: QEasingCurve
the interpolation mode of animation
- setCurrentWidget(widget, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)¶
set currect widget
Parameters¶
- widget:
the widget to be displayed
- isNeedPopOut: bool
need pop up animation or not
- showNextWidgetDirectly: bool
whether to show next widget directly when animation started
- duration: int
animation duration
- easingCurve: QEasingCurve
the interpolation mode of animation
- class OpacityAniStackedWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QStackedWidgetStacked widget with fade in and fade out animation
- addWidget(w: PyQt5.QtWidgets.QWidget)¶
- setCurrentIndex(index: int)¶
- setCurrentWidget(w: PyQt5.QtWidgets.QWidget)¶
- class TransitionStackedWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QStackedWidget- aniFinished¶
- aniStart¶
- setAnimationEnabled(isEnabled: bool)¶
set whether the transition animation is enabled
- isAnimationEnabled() bool¶
return whether the transition animation is enabled
- addWidget(w)¶
- insertWidget(index, w)¶
- setCurrentWidget(widget: PyQt5.QtWidgets.QWidget, duration: int = None, isBack: bool = False)¶
set current page widget with transition animation
Parameters¶
- widget: QWidget
target widget to display
- duration: int
animation duration in milliseconds, None for default
- isBack: bool
whether this is a back navigation
- class EntranceTransitionStackedWidget(parent=None)¶
Bases:
TransitionStackedWidget
- class DrillInTransitionStackedWidget(parent=None)¶
Bases:
TransitionStackedWidget
- class StateToolTip(title, content, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetState tooltip
- closedSignal¶
- title¶
- content¶
- titleLabel¶
- contentLabel¶
- rotateTimer¶
- opacityEffect¶
- animation¶
- closeButton¶
- isDone = False¶
- rotateAngle = 0¶
- deltaAngle = 20¶
- setTitle(title: str)¶
set the title of tooltip
- setContent(content: str)¶
set the content of tooltip
- setState(isDone=False)¶
set the state of tooltip
- getSuitablePos()¶
get suitable position in main window
- paintEvent(e)¶
paint state tooltip
- class SwitchButton(parent: PyQt5.QtWidgets.QWidget = None, indicatorPos=IndicatorPosition.LEFT)¶
Bases:
PyQt5.QtWidgets.QWidgetSwitch button class
Constructors¶
SwitchButton(parent: QWidget = None)
SwitchButton(text: str = “Off”, parent: QWidget = None, `indicatorPos`=IndicatorPosition.LEFT)
- checkedChanged¶
- lightTextColor¶
- darkTextColor¶
- indicatorPos¶
- hBox¶
- indicator¶
- label¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- isChecked()¶
- setChecked(isChecked)¶
set checked state
- setTextColor(light, dark)¶
set the color of text
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
text color in light/dark theme mode
- setCheckedIndicatorColor(light, dark)¶
set the color of indicator in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
border color in light/dark theme mode
- toggleChecked()¶
toggle checked state
- getText()¶
- setText(text)¶
- getSpacing()¶
- setSpacing(spacing)¶
- getOnText()¶
- setOnText(text)¶
- getOffText()¶
- setOffText(text)¶
- spacing¶
- checked¶
- text¶
- onText¶
- offText¶
- class TableView(parent=None)¶
Bases:
TableBase,PyQt5.QtWidgets.QTableViewTable view
- isSelectRightClickedRow()¶
- setSelectRightClickedRow(isSelect: bool)¶
- selectRightClickedRow¶
- class TableWidget(parent=None)¶
Bases:
TableBase,PyQt5.QtWidgets.QTableWidgetTable widget
- setCurrentCell(row: int, column: int, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)¶
- setCurrentItem(item: PyQt5.QtWidgets.QTableWidgetItem, command: PyQt5.QtCore.QItemSelectionModel.SelectionFlag | PyQt5.QtCore.QItemSelectionModel.SelectionFlags = None)¶
- isSelectRightClickedRow()¶
- setSelectRightClickedRow(isSelect: bool)¶
- selectRightClickedRow¶
- class TableItemDelegate(parent: PyQt5.QtWidgets.QTableView)¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegate- margin = 2¶
- hoverRow = -1¶
- pressedRow = -1¶
- selectedRows¶
- lightCheckedColor¶
- darkCheckedColor¶
- setHoverRow(row: int)¶
- setPressedRow(row: int)¶
- setSelectedRows(indexes: List[PyQt5.QtCore.QModelIndex])¶
- sizeHint(option, index)¶
- createEditor(parent: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) PyQt5.QtWidgets.QWidget¶
- updateEditorGeometry(editor: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)¶
- setCheckedColor(light, dark)¶
set the color of indicator in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
color in light/dark theme mode
- initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex)¶
- paint(painter, option, index)¶
- helpEvent(event: PyQt5.QtGui.QHelpEvent, view: PyQt5.QtWidgets.QAbstractItemView, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) bool¶
- class ToolTip(text='', parent=None)¶
Bases:
PyQt5.QtWidgets.QFrameTool tip
- container¶
- timer¶
- containerLayout¶
- label¶
- opacityAni¶
- shadowEffect¶
- text()¶
- setText(text)¶
set text on tooltip
- duration()¶
- setDuration(duration: int)¶
set tooltip duration in milliseconds
Parameters¶
- duration: int
display duration in milliseconds, if duration <= 0, tooltip won’t disappear automatically
- showEvent(e)¶
- hideEvent(e)¶
- adjustPos(widget, position: ToolTipPosition)¶
adjust the position of tooltip relative to widget
- class ToolTipFilter(parent: PyQt5.QtWidgets.QWidget, showDelay=300, position=ToolTipPosition.TOP)¶
Bases:
PyQt5.QtCore.QObjectTool tip filter
- isEnter = False¶
- position¶
- timer¶
- eventFilter(obj: PyQt5.QtCore.QObject, e: PyQt5.QtCore.QEvent) bool¶
- hideToolTip()¶
hide tool tip
- showToolTip()¶
show tool tip
- setToolTipDelay(delay: int)¶
set the delay of tool tip
- class ToolTipPosition¶
Bases:
enum.EnumInfo 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,TreeViewBaseTree widget
- viewportEvent(event)¶
Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.
- class TreeView(parent=None)¶
Bases:
PyQt5.QtWidgets.QTreeView,TreeViewBaseTree view
- viewportEvent(event)¶
Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.
- class TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView)¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegateTree item delegate
- lightCheckedColor¶
- darkCheckedColor¶
- setCheckedColor(light, dark)¶
set the color of indicator in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
color in light/dark theme mode
- paint(painter, option, index)¶
- initStyleOption(option, index)¶
- class CycleListWidget(items: Iterable, itemSize: PyQt5.QtCore.QSize, align=Qt.AlignCenter, parent=None)¶
Bases:
PyQt5.QtWidgets.QListWidgetCycle list widget
- currentItemChanged¶
- itemSize¶
- align¶
- upButton¶
- downButton¶
- scrollDuration = 250¶
- originItems¶
- vScrollBar¶
- visibleNumber = 9¶
- setItems(items: list)¶
set items in the list
Parameters¶
- items: Iterable[Any]
the items to be added
- itemSize: QSize
the size of item
- align: Qt.AlignmentFlag
the text alignment of item
- setSelectedItem(text: str)¶
set the selected item
- scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter)¶
scroll to item
- wheelEvent(e)¶
- setScrollButtonRepeatEnabled(isEnabled: bool)¶
set whether to enable scroll button auto repeat
- scrollDown()¶
scroll down an item
- scrollUp()¶
scroll up an item
- enterEvent(e)¶
- leaveEvent(e)¶
- resizeEvent(e)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- currentItem()¶
- currentIndex()¶
- setCurrentIndex(index: int)¶
- class IndeterminateProgressBar(parent=None, start=True)¶
Bases:
PyQt5.QtWidgets.QProgressBarIndeterminate progress bar
- shortBarAni¶
- longBarAni¶
- aniGroup¶
- longBarAniGroup¶
- lightBarColor()¶
- darkBarColor()¶
- setCustomBarColor(light, dark)¶
set the custom bar color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
bar color in light/dark theme mode
- shortPos()¶
- longPos()¶
- start()¶
- stop()¶
- isStarted()¶
- pause()¶
- resume()¶
- setPaused(isPaused: bool)¶
- isPaused()¶
- error()¶
- setError(isError: bool)¶
- isError()¶
- barColor()¶
- paintEvent(e)¶
- class ProgressBar(parent=None, useAni=True)¶
Bases:
PyQt5.QtWidgets.QProgressBar- lightBackgroundColor¶
- darkBackgroundColor¶
- ani¶
- getVal()¶
- setVal(v: float)¶
- isUseAni()¶
- setUseAni(isUSe: bool)¶
- lightBarColor()¶
- darkBarColor()¶
- setCustomBarColor(light, dark)¶
set the custom bar color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
bar color in light/dark theme mode
- setCustomBackgroundColor(light, dark)¶
set the custom background color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
background color in light/dark theme mode
- resume()¶
- pause()¶
- setPaused(isPaused: bool)¶
- isPaused()¶
- error()¶
- setError(isError: bool)¶
- isError()¶
- barColor()¶
- valText()¶
- paintEvent(e)¶
- useAni¶
- val¶
- class ProgressRing(parent=None, useAni=True)¶
Bases:
qfluentwidgets.components.widgets.progress_bar.ProgressBarProgress ring
- lightBackgroundColor¶
- darkBackgroundColor¶
- getStrokeWidth()¶
- setStrokeWidth(w: int)¶
- paintEvent(e)¶
- strokeWidth¶
- class IndeterminateProgressRing(parent=None, start=True)¶
Bases:
PyQt5.QtWidgets.QProgressBarIndeterminate progress ring
- lightBackgroundColor¶
- darkBackgroundColor¶
- startAngleAni1¶
- startAngleAni2¶
- spanAngleAni1¶
- spanAngleAni2¶
- startAngleAniGroup¶
- spanAngleAniGroup¶
- aniGroup¶
- startAngle()¶
- spanAngle()¶
- getStrokeWidth()¶
- setStrokeWidth(w: int)¶
- start()¶
start spin
- stop()¶
stop spin
- lightBarColor()¶
- darkBarColor()¶
- setCustomBarColor(light, dark)¶
set the custom bar color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
bar color in light/dark theme mode
- setCustomBackgroundColor(light, dark)¶
set the custom background color
Parameters¶
- light, dark: str | Qt.GlobalColor | QColor
background color in light/dark theme mode
- paintEvent(e)¶
- strokeWidth¶
- class ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea)¶
Bases:
PyQt5.QtWidgets.QWidgetFluent scroll bar
- rangeChanged¶
- valueChanged¶
- sliderPressed¶
- sliderReleased¶
- sliderMoved¶
- groove¶
- handle¶
- handleDisplayMode¶
- value()¶
- val()¶
- minimum()¶
- maximum()¶
- orientation()¶
- pageStep()¶
- singleStep()¶
- isSliderDown()¶
- setValue(value: int)¶
- setMinimum(min: int)¶
- setMaximum(max: int)¶
- setRange(min: int, max: int)¶
- setPageStep(step: int)¶
- setSingleStep(step: int)¶
- setSliderDown(isDown: bool)¶
- setHandleColor(light, dark)¶
set the color of handle
Parameters¶
- light, dark: QColor | str | Qt.GlobalColor
the color in light/dark theme mode
- setArrowColor(light, dark)¶
set the color of arrow button
Parameters¶
- light, dark: QColor | str | Qt.GlobalColor
the color in light/dark theme mode
- setGrooveColor(light, dark)¶
set the color of groove
Parameters¶
- light, dark: QColor | str | Qt.GlobalColor
the color in light/dark theme mode
- setHandleDisplayMode(mode: ScrollBarHandleDisplayMode)¶
set the display mode of handle
- expand()¶
expand scroll bar
- collapse()¶
collapse scroll bar
- enterEvent(e)¶
- leaveEvent(e)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- resizeEvent(e)¶
- mousePressEvent(e: PyQt5.QtGui.QMouseEvent)¶
- mouseReleaseEvent(e)¶
- mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)¶
- setForceHidden(isHidden: bool)¶
whether to force the scrollbar to be hidden
- wheelEvent(e)¶
- class SmoothScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent)¶
Bases:
ScrollBarSmooth scroll bar
- duration = 500¶
- ani¶
- setValue(value, useAni=True)¶
- scrollValue(value, useAni=True)¶
scroll the specified distance
- scrollTo(value, useAni=True)¶
scroll to the specified position
- resetValue(value)¶
- mousePressEvent(e)¶
- mouseMoveEvent(e)¶
- class SmoothScrollDelegate(parent: PyQt5.QtWidgets.QAbstractScrollArea, useAni=False)¶
Bases:
PyQt5.QtCore.QObjectSmooth scroll delegate
- useAni = False¶
- vScrollBar¶
- hScrollBar¶
- verticalSmoothScroll¶
- horizonSmoothScroll¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- setVerticalScrollBarPolicy(policy)¶
- setHorizontalScrollBarPolicy(policy)¶
- class ScrollBarHandleDisplayMode¶
Bases:
enum.EnumScroll bar handle display mode
- ALWAYS = 0¶
- ON_HOVER = 1¶
- class TeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)¶
Bases:
PyQt5.QtWidgets.QWidgetTeaching tip
- target¶
- duration = 1000¶
- isDeleteOnClose = True¶
- manager¶
- hBoxLayout¶
- opacityAni¶
- bubble¶
- setShadowEffect(blurRadius=35, offset=(0, 8))¶
add shadow to dialog
- showEvent(e)¶
- closeEvent(e)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)¶
add widget to teaching tip
- property view¶
- setView(view)¶
- classmethod make(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)¶
Parameters¶
- view: FlyoutViewBase
teaching tip view
- target: QWidget
the target widget to show tip
- duration: int
the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear.
- tailPosition: TeachingTipTailPosition
the position of bubble tail
- parent: QWidget
parent widget
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- classmethod create(target: PyQt5.QtWidgets.QWidget, title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=True, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)¶
Parameters¶
- target: QWidget
the target widget to show tip
- title: str
the title of teaching tip
- content: str
the content of teaching tip
- icon: InfoBarIcon | FluentIconBase | QIcon | str
the icon of teaching tip
- image: str | QPixmap | QImage
the image of teaching tip
- isClosable: bool
whether to show the close button
- duraction: int
the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear.
- parent: QWidget
parent widget
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- class TeachingTipTailPosition¶
Bases:
enum.EnumTeaching 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.FlyoutViewTeaching tip view
- manager¶
- hBoxLayout¶
- paintEvent(e)¶
- class PopupTeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)¶
Bases:
TeachingTipPop 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:
FlyoutViewBaseFlyout view
- closed¶
- icon = None¶
- title¶
- image = None¶
- content¶
- isClosable = False¶
- vBoxLayout¶
- viewLayout¶
- widgetLayout¶
- titleLabel¶
- contentLabel¶
- iconWidget¶
- imageLabel¶
- closeButton¶
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)¶
add widget to view
- showEvent(e)¶
- class FlyoutViewBase(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetFlyout view base class
- abstract addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)¶
- backgroundColor()¶
- borderColor()¶
- paintEvent(e)¶
- class Flyout(view: FlyoutViewBase, parent=None, isDeleteOnClose=True, isMacInputMethodEnabled=False)¶
Bases:
PyQt5.QtWidgets.QWidgetFlyout
- closed¶
- view¶
- hBoxLayout¶
- aniManager: FlyoutAnimationManager = None¶
- isDeleteOnClose = True¶
- isMacInputMethodEnabled = False¶
- eventFilter(watched, event)¶
- setShadowEffect(blurRadius=35, offset=(0, 8))¶
add shadow to dialog
- closeEvent(e)¶
- showEvent(e)¶
- exec(pos: PyQt5.QtCore.QPoint, aniType=FlyoutAnimationType.PULL_UP)¶
show calendar view
- classmethod make(view: FlyoutViewBase, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True, isMacInputMethodEnabled=False)¶
create and show a flyout
Parameters¶
- view: FlyoutViewBase
flyout view
- target: QWidget | QPoint
the target widget or position to show flyout
- parent: QWidget
parent window
- aniType: FlyoutAnimationType
flyout animation type
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- classmethod create(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=False, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True, isMacInputMethodEnabled=False)¶
create and show a flyout using the default view
Parameters¶
- title: str
the title of teaching tip
- content: str
the content of teaching tip
- icon: InfoBarIcon | FluentIconBase | QIcon | str
the icon of teaching tip
- image: str | QPixmap | QImage
the image of teaching tip
- isClosable: bool
whether to show the close button
- target: QWidget | QPoint
the target widget or position to show flyout
- parent: QWidget
parent window
- aniType: FlyoutAnimationType
flyout animation type
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- fadeOut()¶
- class FlyoutAnimationType¶
Bases:
enum.EnumFlyout 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.QObjectFlyout animation manager
- managers¶
- flyout¶
- aniGroup¶
- slideAni¶
- opacityAni¶
- classmethod register(name)¶
register menu animation manager
Parameters¶
- name: Any
the name of manager, it should be unique
- abstract exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- abstract position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- classmethod make(aniType: FlyoutAnimationType, flyout: Flyout) FlyoutAnimationManager¶
mask animation manager
- class TabBar(parent=None)¶
Bases:
qfluentwidgets.components.widgets.scroll_area.SingleDirectionScrollAreaTab bar
- currentChanged¶
- tabBarClicked¶
- tabBarDoubleClicked¶
- tabCloseRequested¶
- tabAddRequested¶
- tabMoved¶
- dragPos¶
- isDraging = False¶
- lightSelectedBackgroundColor¶
- darkSelectedBackgroundColor¶
- closeButtonDisplayMode¶
- view¶
- hBoxLayout¶
- itemLayout¶
- widgetLayout¶
- addButton¶
- setAddButtonVisible(isVisible: bool)¶
- addTab(routeKey: str, text: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, onClick=None)¶
add tab
Parameters¶
- routeKey: str
the unique name of tab item
- text: str
the text of tab item
- text: str
the icon of tab item
- onClick: callable
the slot connected to item clicked signal
- insertTab(index: int, routeKey: str, text: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, onClick=None)¶
insert tab
Parameters¶
- index: int
the insert position of tab item
- routeKey: str
the unique name of tab item
- text: str
the text of tab item
- text: str
the icon of tab item
- onClick: callable
the slot connected to item clicked signal
- removeTab(index: int)¶
- removeTabByKey(routeKey: str)¶
- setCurrentIndex(index: int)¶
set current index
- setCurrentTab(routeKey: str)¶
- currentIndex()¶
- currentTab()¶
- setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)¶
set close button display mode
- tabItem(index: int)¶
- tab(routeKey: str)¶
- tabRegion() PyQt5.QtCore.QRect¶
return the bounding rect of all tabs
- tabRect(index: int)¶
return the visual rectangle of the tab at position index
- tabData(index: int)¶
- setTabData(index: int, data)¶
- tabText(index: int)¶
- tabIcon(index: int)¶
- tabToolTip(index: int)¶
- isTabEnabled(index: int)¶
- setTabEnabled(index: int, isEnabled: bool)¶
- setTabsClosable(isClosable: bool)¶
set whether the tab is closable
- tabsClosable()¶
- setTabIcon(index: int, icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)¶
set tab icon
- setTabText(index: int, text: str)¶
set tab text
- isTabVisible(index: int)¶
- setTabVisible(index: int, isVisible: bool)¶
set the visibility of tab
- setTabTextColor(index: int, color: PyQt5.QtGui.QColor)¶
set the text color of tab item
- setTabToolTip(index: int, toolTip: str)¶
set tool tip of tab
- setTabSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)¶
set the background in selected state
- setTabShadowEnabled(isEnabled: bool)¶
set whether the shadow of tab is enabled
- isTabShadowEnabled()¶
- paintEvent(e)¶
- setMovable(movable: bool)¶
- isMovable()¶
- setScrollable(scrollable: bool)¶
- setTabMaximumWidth(width: int)¶
set the maximum width of tab
- setTabMinimumWidth(width: int)¶
set the minimum width of tab
- tabMaximumWidth()¶
- tabMinimumWidth()¶
- isScrollable()¶
- count()¶
returns the number of tabs
- clear()¶
Remove all tabs
- mousePressEvent(e: PyQt5.QtGui.QMouseEvent)¶
- mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)¶
- mouseReleaseEvent(e)¶
- movable¶
- scrollable¶
- tabMaxWidth¶
- tabMinWidth¶
- tabShadowEnabled¶
- class TabItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.PushButtonTab item
- closed¶
- doubleClicked¶
- slideTo(x: int, duration=250)¶
- setShadowEnabled(isEnabled: bool)¶
set whether the shadow is enabled
- setRouteKey(key: str)¶
- routeKey()¶
- setBorderRadius(radius: int)¶
- setSelected(isSelected: bool)¶
- setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)¶
set close button display mode
- setTextColor(color: PyQt5.QtGui.QColor)¶
- setSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)¶
set background color in selected state
- resizeEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- mouseMoveEvent(e)¶
- mouseReleaseEvent(e)¶
- mouseDoubleClickEvent(e: PyQt5.QtGui.QMouseEvent)¶
- sizeHint()¶
- paintEvent(e)¶
- class TabCloseButtonDisplayMode¶
Bases:
enum.EnumTab close button display mode
- ALWAYS = 0¶
- ON_HOVER = 1¶
- NEVER = 2¶
- class TabWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidget- currentChanged¶
- tabBarClicked¶
- tabCloseRequested¶
- tabAddRequested¶
- tabBarDoubleClicked¶
- tabBar¶
- stackedWidget¶
- vBoxLayout¶
- addPage(widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int¶
Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar.
Parameters¶
- widget: QWidget
the widget in the new tab
- label: str
the title of tab
- icon: str | QIcon | FluentIconBase
the icon of tab
- routeKey: str
the route key of new tab, if not provided, an unique uuid will be generated as route key
Returns¶
- index: int
the index of the tab
- addTab(widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int¶
Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar.
Parameters¶
- widget: QWidget
the widget in the new tab
- label: str
the title of tab
- icon: str | QIcon | FluentIconBase
the icon of tab
- routeKey: str
the route key of new tab, if not provided, an unique uuid will be generated as route key
Returns¶
- index: int
the index of the tab
- insertTab(index: int, widget: PyQt5.QtWidgets.QWidget, label: str, icon: PyQt5.QtGui.QIcon | str | qfluentwidgets.common.icon.FluentIconBase = None, routeKey=None) int¶
Inserts a tab with the given label and page into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar.
Parameters¶
- index: int
the index of new tab to be inserted
- widget: QWidget
the widget in the new tab
- label: str
the title of tab
- icon: str | QIcon | FluentIconBase
the icon of tab
- routeKey: str
the route key of new tab, if not provided, an unique uuid will be generated as route key
Returns¶
- index: int
the index of the tab
- removeTab(index: int)¶
Removes the tab at position index from this stack of widgets. The page widget itself is not deleted.
Parameters¶
- index: int
the index of removed widget
- clear()¶
Removes all the pages, but does not delete them.
- widget(index: int)¶
Returns the tab page at index position index or None if the index is out of range.
- currentWidget() PyQt5.QtWidgets.QWidget¶
Returns a pointer to the page currently being displayed.
- currentIndex()¶
Returns the index position of the current tab page, returns -1 if there is no current widget.
- setTabBar(tabBar)¶
Replaces the original tab bar with new one. Note that this must be called before any tabs have been added, or the behavior is undefined.
- isMovable()¶
Returns whether the user can move the tabs within the tabbar area.
- setMovable(movable: bool)¶
- isTabEnabled(index: int)¶
- setTabEnabled(index: int, isEnabled: bool)¶
- isTabVisible(index: int)¶
- setTabVisible(index: int, isVisible: bool)¶
- tabText(index: int)¶
- tabIcon(index: int)¶
- tabToolTip(index: int)¶
- setTabsClosable(closable: bool)¶
- tabsClosable() bool¶
- setTabIcon(index: int, icon: PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase | str)¶
- setTabText(index: int, text: str)¶
- setTabToolTip(index: int, tip: str)¶
- setTabTextColor(index: int, color)¶
- setTabSelectedBackgroundColor(light, dark)¶
- setTabShadowEnabled(enabled: bool)¶
- setScrollable(scrollable: bool)¶
- isScrollable() bool¶
- setTabMaximumWidth(width: int)¶
- setTabMinimumWidth(width: int)¶
- tabMaximumWidth() int¶
- tabMinimumWidth() int¶
- tabData(index: int)¶
- setTabData(index: int, data)¶
- count() int¶
Returns the number of tabs in the tab bar.
- setCurrentIndex(index: int)¶
the index of the tab bar’s visible tab
- setCurrentWidget(widget: PyQt5.QtWidgets.QWidget)¶
Sets the current tab to the tab which contains the given widget.
- setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode)¶
- class PipsPager(parent=None)¶
Bases:
PyQt5.QtWidgets.QListWidgetPips pager
Constructors¶
PipsPager(parent: QWidget = None)
PipsPager(orient: Qt.Orientation, parent: QWidget = None)
- currentIndexChanged¶
- orientation¶
- setPageNumber(n: int)¶
set the number of page
- getPageNumber()¶
get the number of page
- getVisibleNumber()¶
get the number of visible pips
- setVisibleNumber(n: int)¶
- scrollNext()¶
scroll down an item
- scrollPrevious()¶
scroll up an item
- scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter)¶
scroll to item
- adjustSize() None¶
- isHorizontal()¶
- setCurrentIndex(index: int)¶
set current index
- isPreviousButtonVisible()¶
- isNextButtonVisible()¶
- currentIndex()¶
- setPreviousButtonDisplayMode(mode: PipsScrollButtonDisplayMode)¶
set the display mode of previous button
- setNextButtonDisplayMode(mode: PipsScrollButtonDisplayMode)¶
set the display mode of next button
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- wheelEvent(e)¶
- resizeEvent(e)¶
- visibleNumber¶
- pageNumber¶
- class PipsScrollButtonDisplayMode¶
Bases:
enum.EnumPips pager scroll button display mode
- ALWAYS = 0¶
- ON_HOVER = 1¶
- NEVER = 2¶
- class HorizontalSeparator(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetHorizontal separator
- paintEvent(e)¶
- class VerticalSeparator(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetVertical separator
- paintEvent(e)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation widget
set whether the widget is compacted
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
set the text color in light theme mode
set the text color in dark theme mode
set the text color in light/dark theme mode
get the indicator geometry
Bases:
NavigationWidgetNavigation push button
Bases:
NavigationWidgetNavigation Separator
set whether the widget is compacted
Bases:
NavigationPushButtonNavigation tool button
set whether the widget is compacted
Bases:
NavigationTreeWidgetBaseNavigation tree widget
add child
Parameters¶
- child: NavigationTreeWidgetBase
child item
set the text color in light theme mode
set the text color in dark theme mode
set the text color in light/dark theme mode
set the indicator color in light/dark theme mode
insert child
Parameters¶
- child: NavigationTreeWidgetBase
child item
remove child
Parameters¶
- child: NavigationTreeWidgetBase
child item
return child items
set the expanded status
is root node
is leaf node
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
set whether the widget is compacted
set whether to remember expand state
save current expand state
restore saved expand state
Bases:
NavigationWidgetNavigation tree widget base class
add child
Parameters¶
- child: NavigationTreeWidgetBase
child item
insert child
Parameters¶
- child: NavigationTreeWidgetBase
child item
remove child
Parameters¶
- child: NavigationTreeWidgetBase
child item
is root node
is leaf node
set the expanded status
Parameters¶
- isExpanded: bool
whether to expand node
return child items
set whether to remember expand state
save current expand state
restore saved expand state
Bases:
NavigationWidgetAvatar widget
Bases:
NavigationWidgetNavigation item header for grouping items
set whether the widget is compacted
Bases:
NavigationAvatarWidgetNavigation user card widget
set avatar icon when no image is set
set avatar background color in light/dark theme mode
get user card title
set user card title
get user card subtitle
set user card subtitle
set title font size
set subtitle font size
set animation duration in milliseconds
set whether the widget is compacted
Bases:
PyQt5.QtWidgets.QFrameNavigation panel
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
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
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
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
add separator
Parameters¶
- position: NavigationPostion
where to add the separator
add separator
Parameters¶
- index: int
insert position
- position: NavigationPostion
where to add the separator
add item header
Parameters¶
- text: str
header text
- position: NavigationItemPosition
where to add the header
Returns¶
- NavigationItemHeader
created header widget
insert item header
Parameters¶
- index: int
insert position
- text: str
header text
- position: NavigationItemPosition
where to add the header
Returns¶
- NavigationItemHeader
created header widget
remove widget
Parameters¶
- routeKey: str
the unique name of item
set whether the menu button is visible
set whether the return button is visible
set the maximum width
Set the minimum window width that allows panel to be expanded
whether the acrylic effect is enabled
expand navigation panel
collapse navigation panel
toggle navigation panel
set current selected item
Parameters¶
- routeKey: str
the unique name of item
Bases:
enum.EnumNavigation item position
Bases:
enum.EnumNavigation display mode
Bases:
PyQt5.QtWidgets.QWidgetNavigation interface
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
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
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
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
add separator
Parameters¶
- position: NavigationPostion
where to add the separator
add item header for grouping navigation items
Parameters¶
- text: str
header text to display
- position: NavigationItemPosition
where the header is added
Returns¶
- NavigationItemHeader
created header widget
insert item header for grouping navigation items
Parameters¶
- index: int
insert position
- text: str
header text to display
- position: NavigationItemPosition
where the header is added
Returns¶
- NavigationItemHeader
created header widget
add user card to navigation panel
Parameters¶
- routeKey: str
the unique name of user card
- avatar: str | QIcon | FluentIconBase
avatar image or icon
- title: str
user name or title text
- subtitle: str
subtitle text (e.g., email, status)
- onClick: callable
the slot connected to card clicked signal
- position: NavigationItemPosition
where the card is added
- aboveMenuButton: bool
whether to place the card above the menu button (expand/collapse button)
Returns¶
- NavigationUserCard
created user card widget
add separator
Parameters¶
- index: int
insert position
- position: NavigationPostion
where to add the separator
remove widget
Parameters¶
- routKey: str
the unique name of item
set current selected item
Parameters¶
- name: str
the unique name of item
expand navigation panel
toggle navigation panel
set the maximum width
Set the minimum window width that allows panel to be expanded
set whether the menu button is visible
set whether the return button is visible
set whether the acrylic background effect is enabled
set whether the indicator sliding animation is enabled
set whether to update indicator position when collapese finished
Bases:
qfluentwidgets.components.navigation.navigation_widget.NavigationPushButtonNavigation bar push button
get the indicator geometry
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
Bases:
PyQt5.QtWidgets.QWidgetadd 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
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
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
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
remove widget
Parameters¶
- routeKey: str
the unique name of item
set current selected item
Parameters¶
- routeKey: str
the unique name of item
set the font of navigation item
set whether the text is visible when button is selected
set the selected color of all items
- class Pivot(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetPivot
- currentItemChanged¶
- lightIndicatorColor¶
- darkIndicatorColor¶
- hBoxLayout¶
- slideAni¶
- addItem(routeKey: str, text: str, onClick=None, icon=None)¶
add item
Parameters¶
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- addWidget(routeKey: str, widget: PivotItem, onClick=None)¶
add widget
Parameters¶
- routeKey: str
the unique name of item
- widget: PivotItem
navigation widget
- onClick: callable
the slot connected to item clicked signal
- insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- insertWidget(index: int, routeKey: str, widget: PivotItem, onClick=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- widget: PivotItem
navigation widget
- onClick: callable
the slot connected to item clicked signal
- clear()¶
clear all navigation items
- currentItem()¶
Returns the current selected item
- currentRouteKey()¶
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- showEvent(e)¶
- setIndicatorLength(len: int)¶
- indicatorLength()¶
- setItemFontSize(size: int)¶
set the pixel font size of items
- setItemText(routeKey: str, text: str)¶
set the text of item
- setIndicatorColor(light, dark)¶
- widget(routeKey: str)¶
- resizeEvent(e) None¶
- currentIndicatorGeometry()¶
- paintEvent(e)¶
- class PivotItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.PushButtonPivot item
- itemClicked¶
- setSelected(isSelected: bool)¶
- class SegmentedItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.navigation.pivot.PivotItemSegmented item
- class SegmentedWidget(parent=None)¶
Bases:
qfluentwidgets.components.navigation.pivot.PivotSegmented widget
- slideAni¶
- insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- paintEvent(e)¶
- currentIndicatorGeometry()¶
- class SegmentedToolItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.ToolButtonPivot item
- itemClicked¶
- setSelected(isSelected: bool)¶
- class SegmentedToolWidget(parent=None)¶
Bases:
SegmentedWidgetSegmented 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.TransparentToolButtonTransparent 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:
SegmentedToolWidgetSegmented toggle tool widget
- paintEvent(e)¶
- class BreadcrumbBar(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetBreadcrumb bar
- currentItemChanged¶
- currentIndexChanged¶
- itemMap: Dict[BreadcrumbItem]¶
- items: List[BreadcrumbItem] = []¶
- elideButton¶
- addItem(routeKey: str, text: str)¶
add item
Parameters¶
- routeKey: str
unique key of item
- text: str
the text of item
- setCurrentIndex(index: int)¶
- setCurrentItem(routeKey: str)¶
- setItemText(routeKey: str, text: str)¶
- item(routeKey: str) BreadcrumbItem¶
- itemAt(index: int)¶
- currentIndex()¶
- currentItem() BreadcrumbItem¶
- resizeEvent(e)¶
- clear()¶
clear all items
- popItem()¶
pop trailing item
- count()¶
Returns the number of items
- updateGeometry()¶
- isElideVisible()¶
- setFont(font: PyQt5.QtGui.QFont)¶
- getSpacing()¶
- setSpacing(spacing: int)¶
- spacing¶
- class BreadcrumbItem(routeKey: str, text: str, index: int, parent=None)¶
Bases:
BreadcrumbWidgetBreadcrumb item
- text¶
- routeKey¶
- isHover = False¶
- isPressed = False¶
- isSelected = False¶
- index¶
- spacing = 5¶
- setText(text: str)¶
- isRoot()¶
- setSelected(isSelected: bool)¶
- setFont(font: PyQt5.QtGui.QFont)¶
- setSpacing(spacing: int)¶
- paintEvent(e)¶
- class CalendarPicker(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonCalendar picker
- dateChanged¶
- getDate()¶
- setDate(date: PyQt5.QtCore.QDate)¶
set the selected date
- reset()¶
reset date
- getDateFormat()¶
- setDateFormat(format: PyQt5.QtCore.Qt.DateFormat | str)¶
- isRestEnabled()¶
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- paintEvent(e)¶
- date¶
- dateFormat¶
- class FastCalendarPicker(parent=None)¶
Bases:
CalendarPickerPro calendar picker
- flyoutAnimationType¶
- setFlyoutAnimationType(aniType: qfluentwidgets.components.widgets.flyout.FlyoutAnimationType)¶
- class DatePickerBase(parent=None)¶
Bases:
qfluentwidgets.components.date_time.picker_base.PickerBaseDate picker base class
- dateChanged¶
- calendar¶
- getDate()¶
- abstract setDate(date: PyQt5.QtCore.QDate)¶
set current date
- setYearFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- setMonthFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- setDayFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter)¶
- yearFormatter()¶
- dayFormatter()¶
- monthFormatter()¶
- reset()¶
Reset date
- class DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True)¶
Bases:
DatePickerBaseDate picker
- MM_DD_YYYY = 0¶
- YYYY_MM_DD = 1¶
- MONTH¶
- YEAR¶
- DAY¶
- isMonthTight = True¶
- setDateFormat(format: int)¶
set the format of date
Parameters¶
- format: int
the format of date, could be DatePicker.MM_DD_YYYY or DatePicker.YYYY_MM_DD
- panelInitialValue()¶
initial value of panel
- setMonthTight(isTight: bool)¶
set whether the month column is tight
- getDate()¶
- setDate(date: PyQt5.QtCore.QDate)¶
set current date
- date¶
- class ZhDatePicker(parent=None)¶
Bases:
DatePickerChinese date picker
- MONTH = '月'¶
- YEAR = '年'¶
- DAY = '日'¶
- class PickerBase(parent=None)¶
Bases:
PyQt5.QtWidgets.QPushButtonPicker base class
- columns: List[PickerColumnButton] = []¶
- lightSelectedBackgroundColor¶
- darkSelectedBackgroundColor¶
- hBoxLayout¶
- setSelectedBackgroundColor(light, dark)¶
set the background color of selected row
- addColumn(name: str, items: Iterable, width: int, align=Qt.AlignCenter, formatter: PickerColumnFormatter = None)¶
add column
Parameters¶
- name: str
the name of column
- items: Iterable
the items of column
- width: int
the width of column
- align: Qt.AlignmentFlag
the text alignment of button
- formatter: PickerColumnFormatter
the formatter of column
- setColumnAlignment(index: int, align=Qt.AlignCenter)¶
set the text alignment of specified column
- setColumnWidth(index: int, width: int)¶
set the width of specified column
- setColumnTight(index: int)¶
make the specified column to be tight
- setColumnVisible(index: int, isVisible: bool)¶
set the text alignment of specified column
- value()¶
- initialValue()¶
- setColumnValue(index: int, value)¶
- setColumnInitialValue(index: int, value)¶
- setColumnFormatter(index: int, formatter: PickerColumnFormatter)¶
- setColumnItems(index: int, items: Iterable)¶
- encodeValue(index: int, value)¶
convert original value to formatted value
- decodeValue(index: int, value)¶
convert formatted value to origin value
- setColumn(index: int, name: str, items: Iterable, width: int, align=Qt.AlignCenter)¶
set column
Parameters¶
- index: int
the index of column
- name: str
the name of column
- items: Iterable
the items of column
- width: int
the width of column
- align: Qt.AlignmentFlag
the text alignment of button
- clearColumns()¶
clear columns
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- panelInitialValue()¶
initial value of panel
- setScrollButtonRepeatEnabled(isEnabled: bool)¶
set whether to enable scroll button auto repeat
- reset()¶
- isRestEnabled()¶
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- class PickerPanel(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetpicker panel
- confirmed¶
- resetted¶
- columnValueChanged¶
- itemHeight = 37¶
- listWidgets: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget] = []¶
- view¶
- itemMaskWidget¶
- hSeparatorWidget¶
- yesButton¶
- resetButton¶
- cancelButton¶
- hBoxLayout¶
- listLayout¶
- buttonLayout¶
- vBoxLayout¶
- scrollButtonRepeatEnabled = True¶
- setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30))¶
add shadow to dialog
- setResetEnabled(isEnabled: bool)¶
set the visibility of reset button
- setScrollButtonRepeatEnabled(isEnabled: bool)¶
set whether to enable scroll button auto repeat
- setSelectedBackgroundColor(light, dark)¶
- isResetEnabled()¶
- addColumn(items: Iterable, width: int, align=Qt.AlignCenter)¶
add one column to view
Parameters¶
- items: Iterable[Any]
the items to be added
- width: int
the width of item
- align: Qt.AlignmentFlag
the text alignment of item
- resizeEvent(e)¶
- value()¶
return the value of columns
- setValue(value: list)¶
set the value of columns
- columnValue(index: int) str¶
return the value of specified column
- setColumnValue(index: int, value: str)¶
set the value of specified column
- column(index: int)¶
return the list widget of specified column
- class PickerColumnFormatter¶
Bases:
PyQt5.QtCore.QObjectPicker 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:
TimePickerBase24 hours time picker
- setSecondVisible(isVisible: bool)¶
set the visibility of seconds column
- panelInitialValue()¶
initial value of panel
- getTime()¶
- isSecondVisible()¶
- time¶
- secondVisible¶