qfluentwidgets ============== .. py:module:: qfluentwidgets .. autoapi-nested-parse:: PyQt-Fluent-Widgets =================== A fluent design widgets library based on PyQt5. Documentation is available in the docstrings and online at https://qfluentwidgets.com. Examples are available at https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/master/examples. :copyright: (c) 2021 by zhiyiYo. :license: GPLv3 for non-commercial project, see README for more details. .. toctree:: :titlesonly: :maxdepth: 3 common/index.rst components/index.rst multimedia/index.rst window/index.rst Package Contents ---------------- .. autoapisummary:: qfluentwidgets.ColorDialog qfluentwidgets.Dialog qfluentwidgets.MessageBox qfluentwidgets.FolderListDialog qfluentwidgets.MessageDialog qfluentwidgets.MessageBoxBase qfluentwidgets.MaskDialogBase qfluentwidgets.ExpandLayout qfluentwidgets.FlowLayout qfluentwidgets.VBoxLayout qfluentwidgets.SettingCard qfluentwidgets.SwitchSettingCard qfluentwidgets.RangeSettingCard qfluentwidgets.PushSettingCard qfluentwidgets.ColorSettingCard qfluentwidgets.HyperlinkCard qfluentwidgets.PrimaryPushSettingCard qfluentwidgets.ColorPickerButton qfluentwidgets.ComboBoxSettingCard qfluentwidgets.ExpandSettingCard qfluentwidgets.ExpandGroupSettingCard qfluentwidgets.FolderListSettingCard qfluentwidgets.OptionsSettingCard qfluentwidgets.CustomColorSettingCard qfluentwidgets.SettingCardGroup qfluentwidgets.DropDownPushButton qfluentwidgets.DropDownToolButton qfluentwidgets.PrimaryPushButton qfluentwidgets.PushButton qfluentwidgets.RadioButton qfluentwidgets.HyperlinkButton qfluentwidgets.ToolButton qfluentwidgets.TransparentToolButton qfluentwidgets.ToggleButton qfluentwidgets.SplitWidgetBase qfluentwidgets.SplitPushButton qfluentwidgets.SplitToolButton qfluentwidgets.PrimaryToolButton qfluentwidgets.PrimarySplitPushButton qfluentwidgets.PrimarySplitToolButton qfluentwidgets.PrimaryDropDownPushButton qfluentwidgets.PrimaryDropDownToolButton qfluentwidgets.ToggleToolButton qfluentwidgets.TransparentPushButton qfluentwidgets.TransparentTogglePushButton qfluentwidgets.TransparentToggleToolButton qfluentwidgets.TransparentDropDownPushButton qfluentwidgets.TransparentDropDownToolButton qfluentwidgets.PillPushButton qfluentwidgets.PillToolButton qfluentwidgets.CardWidget qfluentwidgets.ElevatedCardWidget qfluentwidgets.SimpleCardWidget qfluentwidgets.HeaderCardWidget qfluentwidgets.CardGroupWidget qfluentwidgets.GroupHeaderCardWidget qfluentwidgets.CheckBox qfluentwidgets.ComboBox qfluentwidgets.EditableComboBox qfluentwidgets.CommandBar qfluentwidgets.CommandButton qfluentwidgets.CommandBarView qfluentwidgets.FlipView qfluentwidgets.HorizontalFlipView qfluentwidgets.VerticalFlipView qfluentwidgets.FlipImageDelegate qfluentwidgets.LineEdit qfluentwidgets.TextEdit qfluentwidgets.PlainTextEdit qfluentwidgets.LineEditButton qfluentwidgets.SearchLineEdit qfluentwidgets.PasswordLineEdit qfluentwidgets.TextBrowser qfluentwidgets.IconWidget qfluentwidgets.PixmapLabel qfluentwidgets.CaptionLabel qfluentwidgets.StrongBodyLabel qfluentwidgets.BodyLabel qfluentwidgets.SubtitleLabel qfluentwidgets.TitleLabel qfluentwidgets.LargeTitleLabel qfluentwidgets.DisplayLabel qfluentwidgets.FluentLabelBase qfluentwidgets.ImageLabel qfluentwidgets.AvatarWidget qfluentwidgets.HyperlinkLabel qfluentwidgets.ListWidget qfluentwidgets.ListView qfluentwidgets.ListItemDelegate qfluentwidgets.DWMMenu qfluentwidgets.LineEditMenu qfluentwidgets.RoundMenu qfluentwidgets.MenuAnimationManager qfluentwidgets.MenuAnimationType qfluentwidgets.IndicatorMenuItemDelegate qfluentwidgets.MenuItemDelegate qfluentwidgets.ShortcutMenuItemDelegate qfluentwidgets.CheckableMenu qfluentwidgets.MenuIndicatorType qfluentwidgets.SystemTrayMenu qfluentwidgets.CheckableSystemTrayMenu qfluentwidgets.InfoBar qfluentwidgets.InfoBarIcon qfluentwidgets.InfoBarPosition qfluentwidgets.InfoBarManager qfluentwidgets.InfoBadge qfluentwidgets.InfoLevel qfluentwidgets.DotInfoBadge qfluentwidgets.IconInfoBadge qfluentwidgets.InfoBadgePosition qfluentwidgets.InfoBadgeManager qfluentwidgets.SingleDirectionScrollArea qfluentwidgets.SmoothMode qfluentwidgets.SmoothScrollArea qfluentwidgets.ScrollArea qfluentwidgets.Slider qfluentwidgets.HollowHandleStyle qfluentwidgets.ClickableSlider qfluentwidgets.SpinBox qfluentwidgets.DoubleSpinBox qfluentwidgets.DateEdit qfluentwidgets.DateTimeEdit qfluentwidgets.TimeEdit qfluentwidgets.CompactSpinBox qfluentwidgets.CompactDoubleSpinBox qfluentwidgets.CompactDateEdit qfluentwidgets.CompactDateTimeEdit qfluentwidgets.CompactTimeEdit qfluentwidgets.PopUpAniStackedWidget qfluentwidgets.OpacityAniStackedWidget qfluentwidgets.StateToolTip qfluentwidgets.SwitchButton qfluentwidgets.IndicatorPosition qfluentwidgets.TableView qfluentwidgets.TableWidget qfluentwidgets.TableItemDelegate qfluentwidgets.ToolTip qfluentwidgets.ToolTipFilter qfluentwidgets.ToolTipPosition qfluentwidgets.TreeWidget qfluentwidgets.TreeView qfluentwidgets.TreeItemDelegate qfluentwidgets.CycleListWidget qfluentwidgets.IndeterminateProgressBar qfluentwidgets.ProgressBar qfluentwidgets.ProgressRing qfluentwidgets.IndeterminateProgressRing qfluentwidgets.ScrollBar qfluentwidgets.SmoothScrollBar qfluentwidgets.SmoothScrollDelegate qfluentwidgets.TeachingTip qfluentwidgets.TeachingTipTailPosition qfluentwidgets.TeachingTipView qfluentwidgets.PopupTeachingTip qfluentwidgets.FlyoutView qfluentwidgets.FlyoutViewBase qfluentwidgets.Flyout qfluentwidgets.FlyoutAnimationType qfluentwidgets.FlyoutAnimationManager qfluentwidgets.TabBar qfluentwidgets.TabItem qfluentwidgets.TabCloseButtonDisplayMode qfluentwidgets.PipsPager qfluentwidgets.VerticalPipsPager qfluentwidgets.HorizontalPipsPager qfluentwidgets.PipsScrollButtonDisplayMode qfluentwidgets.HorizontalSeparator qfluentwidgets.VerticalSeparator qfluentwidgets.NavigationWidget qfluentwidgets.NavigationPushButton qfluentwidgets.NavigationSeparator qfluentwidgets.NavigationToolButton qfluentwidgets.NavigationTreeWidget qfluentwidgets.NavigationTreeWidgetBase qfluentwidgets.NavigationAvatarWidget qfluentwidgets.NavigationPanel qfluentwidgets.NavigationItemPosition qfluentwidgets.NavigationDisplayMode qfluentwidgets.NavigationInterface qfluentwidgets.NavigationBarPushButton qfluentwidgets.NavigationBar qfluentwidgets.Pivot qfluentwidgets.PivotItem qfluentwidgets.SegmentedItem qfluentwidgets.SegmentedWidget qfluentwidgets.SegmentedToolItem qfluentwidgets.SegmentedToolWidget qfluentwidgets.SegmentedToggleToolItem qfluentwidgets.SegmentedToggleToolWidget qfluentwidgets.BreadcrumbBar qfluentwidgets.BreadcrumbItem qfluentwidgets.CalendarPicker qfluentwidgets.FastCalendarPicker qfluentwidgets.DatePickerBase qfluentwidgets.DatePicker qfluentwidgets.ZhDatePicker qfluentwidgets.PickerBase qfluentwidgets.PickerPanel qfluentwidgets.PickerColumnFormatter qfluentwidgets.TimePicker qfluentwidgets.AMTimePicker qfluentwidgets.TextWrap qfluentwidgets.Action qfluentwidgets.Icon qfluentwidgets.FluentIcon qfluentwidgets.FluentIconBase qfluentwidgets.ThemeColor qfluentwidgets.FluentStyleSheet qfluentwidgets.StyleSheetBase qfluentwidgets.StyleSheetFile qfluentwidgets.StyleSheetCompose qfluentwidgets.CustomStyleSheet qfluentwidgets.SmoothScroll qfluentwidgets.SmoothMode qfluentwidgets.FluentTranslator qfluentwidgets.Router qfluentwidgets.FluentThemeColor qfluentwidgets.SystemThemeListener qfluentwidgets.Theme qfluentwidgets.ConfigValidator qfluentwidgets.RangeValidator qfluentwidgets.OptionsValidator qfluentwidgets.BoolValidator qfluentwidgets.FolderValidator qfluentwidgets.FolderListValidator qfluentwidgets.ColorValidator qfluentwidgets.ConfigSerializer qfluentwidgets.EnumSerializer qfluentwidgets.ColorSerializer qfluentwidgets.ConfigItem qfluentwidgets.RangeConfigItem qfluentwidgets.OptionsConfigItem qfluentwidgets.ColorConfigItem qfluentwidgets.QConfig qfluentwidgets.FluentWindow qfluentwidgets.MSFluentWindow qfluentwidgets.SplitFluentWindow qfluentwidgets.FluentTitleBar qfluentwidgets.MSFluentTitleBar qfluentwidgets.SplitTitleBar qfluentwidgets.FluentBackgroundTheme qfluentwidgets.SplashScreen .. autoapisummary:: qfluentwidgets.setFont qfluentwidgets.getFont qfluentwidgets.getIconColor qfluentwidgets.drawSvgIcon qfluentwidgets.drawIcon qfluentwidgets.writeSvg qfluentwidgets.setStyleSheet qfluentwidgets.getStyleSheet qfluentwidgets.setTheme qfluentwidgets.themeColor qfluentwidgets.setThemeColor qfluentwidgets.applyThemeColor qfluentwidgets.toggleTheme qfluentwidgets.setCustomStyleSheet qfluentwidgets.exceptionHandler qfluentwidgets.isDarkTheme qfluentwidgets.theme .. autoapisummary:: qfluentwidgets.__version__ qfluentwidgets.__author__ qfluentwidgets.TogglePushButton qfluentwidgets.qrouter qfluentwidgets.ALERT qfluentwidgets.qconfig .. py:data:: __version__ :value: '1.7.0' .. py:data:: __author__ :value: 'zhiyiYo' .. py:class:: ColorDialog(color, title: str, parent=None, enableAlpha=False) Bases: :py:obj:`qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase` Color dialog .. py:attribute:: colorChanged .. py:attribute:: enableAlpha .. py:attribute:: oldColor .. py:attribute:: color .. py:attribute:: scrollArea .. py:attribute:: scrollWidget .. py:attribute:: buttonGroup .. py:attribute:: yesButton .. py:attribute:: cancelButton .. py:attribute:: titleLabel .. py:attribute:: huePanel .. py:attribute:: newColorCard .. py:attribute:: oldColorCard .. py:attribute:: brightSlider .. py:attribute:: editLabel .. py:attribute:: redLabel .. py:attribute:: blueLabel .. py:attribute:: greenLabel .. py:attribute:: opacityLabel .. py:attribute:: hexLineEdit .. py:attribute:: redLineEdit .. py:attribute:: greenLineEdit .. py:attribute:: blueLineEdit .. py:attribute:: opacityLineEdit .. py:attribute:: vBoxLayout .. py:method:: setColor(color, movePicker=True) set color .. py:method:: updateStyle() update style sheet .. py:method:: showEvent(e) fade in .. py:class:: Dialog(title: str, content: str, parent=None) Bases: :py:obj:`qframelesswindow.FramelessDialog`, :py:obj:`Ui_MessageBox` Dialog box .. py:attribute:: yesSignal .. py:attribute:: cancelSignal .. py:attribute:: windowTitleLabel .. py:method:: setTitleBarVisible(isVisible: bool) .. py:class:: MessageBox(title: str, content: str, parent=None) Bases: :py:obj:`qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase`, :py:obj:`Ui_MessageBox` Message box .. py:attribute:: yesSignal .. py:attribute:: cancelSignal .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:class:: FolderListDialog(folderPaths: list, title: str, content: str, parent) Bases: :py:obj:`qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase` Folder list dialog box .. py:attribute:: folderChanged .. py:attribute:: title .. py:attribute:: content .. py:attribute:: folderPaths .. py:attribute:: vBoxLayout .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: scrollArea .. py:attribute:: scrollWidget .. py:attribute:: completeButton .. py:attribute:: addFolderCard .. py:attribute:: folderCards .. py:class:: MessageDialog(title: str, content: str, parent) Bases: :py:obj:`qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase` Win10 style message dialog box with a mask .. py:attribute:: yesSignal .. py:attribute:: cancelSignal .. py:attribute:: content .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: yesButton .. py:attribute:: cancelButton .. py:class:: MessageBoxBase(parent=None) Bases: :py:obj:`qfluentwidgets.components.dialog_box.mask_dialog_base.MaskDialogBase` Message box base .. py:attribute:: buttonGroup .. py:attribute:: yesButton .. py:attribute:: cancelButton .. py:attribute:: vBoxLayout .. py:attribute:: viewLayout .. py:attribute:: buttonLayout .. py:method:: validate() -> bool validate the data of form before closing dialog Returns ------- isValid: bool whether the data of form is legal .. py:method:: hideYesButton() .. py:method:: hideCancelButton() .. py:class:: MaskDialogBase(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QDialog` Dialog box base class with a mask .. py:attribute:: windowMask .. py:attribute:: widget .. py:attribute:: c .. py:method:: setShadowEffect(blurRadius=60, offset=(0, 10), color=QColor(0, 0, 0, 100)) add shadow to dialog .. py:method:: setMaskColor(color: PyQt5.QtGui.QColor) set the color of mask .. py:method:: showEvent(e) fade in .. py:method:: done(code) fade out .. py:method:: isClosableOnMaskClicked() .. py:method:: setClosableOnMaskClicked(isClosable: bool) .. py:method:: resizeEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:class:: ExpandLayout(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QLayout` Expand layout .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: addItem(item) .. py:method:: count() .. py:method:: itemAt(index) .. py:method:: takeAt(index) .. py:method:: expandingDirections() .. py:method:: hasHeightForWidth() .. py:method:: heightForWidth(width) get the minimal height according to width .. py:method:: setGeometry(rect) .. py:method:: sizeHint() .. py:method:: minimumSize() .. py:method:: eventFilter(obj, e) .. py:class:: FlowLayout(parent=None, needAni=False, isTight=False) Bases: :py:obj:`PyQt5.QtWidgets.QLayout` Flow layout .. py:attribute:: duration :value: 300 .. py:attribute:: ease .. py:attribute:: needAni .. py:attribute:: isTight .. py:method:: addItem(item) .. py:method:: insertItem(index, item) .. py:method:: addWidget(w) .. py:method:: insertWidget(index, w) .. py:method:: 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 .. py:method:: count() .. py:method:: itemAt(index: int) .. py:method:: takeAt(index: int) .. py:method:: removeWidget(widget) .. py:method:: removeAllWidgets() remove all widgets from layout .. py:method:: takeAllWidgets() remove all widgets from layout and delete them .. py:method:: expandingDirections() .. py:method:: hasHeightForWidth() .. py:method:: heightForWidth(width: int) get the minimal height according to width .. py:method:: setGeometry(rect: PyQt5.QtCore.QRect) .. py:method:: sizeHint() .. py:method:: minimumSize() .. py:method:: setVerticalSpacing(spacing: int) set vertical spacing between widgets .. py:method:: verticalSpacing() get vertical spacing between widgets .. py:method:: setHorizontalSpacing(spacing: int) set horizontal spacing between widgets .. py:method:: horizontalSpacing() get horizontal spacing between widgets .. py:method:: eventFilter(obj: PyQt5.QtCore.QObject, event: PyQt5.QtCore.QEvent) -> bool .. py:class:: VBoxLayout(parent) Bases: :py:obj:`PyQt5.QtWidgets.QVBoxLayout` Vertical box layout .. py:attribute:: widgets :value: [] .. py:method:: addWidgets(widgets: List[PyQt5.QtWidgets.QWidget], stretch=0, alignment=Qt.AlignTop) add widgets to layout .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, alignment=Qt.AlignTop) add widget to layout .. py:method:: removeWidget(widget: PyQt5.QtWidgets.QWidget) remove widget from layout but not delete it .. py:method:: deleteWidget(widget: PyQt5.QtWidgets.QWidget) remove widget from layout and delete it .. py:method:: removeAllWidget() remove all widgets from layout .. py:class:: SettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Setting card .. py:attribute:: iconLabel .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: hBoxLayout .. py:attribute:: vBoxLayout .. py:method:: setTitle(title: str) set the title of card .. py:method:: setContent(content: str) set the content of card .. py:method:: setValue(value) set the value of config item .. py:method:: setIconSize(width: int, height: int) set the icon fixed size .. py:method:: paintEvent(e) .. py:class:: SwitchSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, configItem: qfluentwidgets.common.config.ConfigItem = None, parent=None) Bases: :py:obj:`SettingCard` Setting card with switch button .. py:attribute:: checkedChanged .. py:attribute:: configItem .. py:attribute:: switchButton .. py:method:: setValue(isChecked: bool) set the value of config item .. py:method:: setChecked(isChecked: bool) .. py:method:: isChecked() .. py:class:: RangeSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a slider .. py:attribute:: valueChanged .. py:attribute:: configItem .. py:attribute:: slider .. py:attribute:: valueLabel .. py:method:: setValue(value) set the value of config item .. py:class:: PushSettingCard(text, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a push button .. py:attribute:: clicked .. py:attribute:: button .. py:class:: ColorSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title: str, content: str = None, parent=None, enableAlpha=False) Bases: :py:obj:`SettingCard` Setting card with color picker .. py:attribute:: colorChanged .. py:attribute:: configItem .. py:attribute:: colorPicker .. py:method:: setValue(color: PyQt5.QtGui.QColor) set the value of config item .. py:class:: HyperlinkCard(url, text, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, parent=None) Bases: :py:obj:`SettingCard` Hyperlink card .. py:attribute:: linkButton .. py:class:: PrimaryPushSettingCard(text, icon, title, content=None, parent=None) Bases: :py:obj:`PushSettingCard` Push setting card with primary color .. py:class:: ColorPickerButton(color: PyQt5.QtGui.QColor, title: str, parent=None, enableAlpha=False) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Color picker button .. py:attribute:: colorChanged .. py:attribute:: title .. py:attribute:: enableAlpha .. py:method:: setColor(color) set color .. py:method:: paintEvent(e) .. py:class:: ComboBoxSettingCard(configItem: qfluentwidgets.common.config.OptionsConfigItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, texts=None, parent=None) Bases: :py:obj:`SettingCard` Setting card with a combo box .. py:attribute:: configItem .. py:attribute:: comboBox .. py:attribute:: optionToText .. py:method:: setValue(value) set the value of config item .. py:class:: ExpandSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str = None, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QScrollArea` Expandable setting card .. py:attribute:: isExpand :value: False .. py:attribute:: scrollWidget .. py:attribute:: view .. py:attribute:: card .. py:attribute:: scrollLayout .. py:attribute:: viewLayout .. py:attribute:: spaceWidget .. py:attribute:: borderWidget .. py:attribute:: expandAni .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget) add widget to tail .. py:method:: wheelEvent(e) .. py:method:: setExpand(isExpand: bool) set the expand status of card .. py:method:: toggleExpand() toggle expand status .. py:method:: resizeEvent(e) .. py:method:: setValue(value) set the value of config item .. py:class:: ExpandGroupSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str = None, parent=None) Bases: :py:obj:`ExpandSettingCard` Expand group setting card .. py:method:: addGroupWidget(widget: PyQt5.QtWidgets.QWidget) add widget to group .. py:class:: FolderListSettingCard(configItem: qfluentwidgets.common.config.ConfigItem, title: str, content: str = None, directory='./', parent=None) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard` Folder list setting card .. py:attribute:: folderChanged .. py:attribute:: configItem .. py:attribute:: addFolderButton .. py:attribute:: folders :type: List[str] .. py:class:: OptionsSettingCard(configItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title, content=None, texts=None, parent=None) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandSettingCard` setting card with a group of options .. py:attribute:: optionChanged .. py:attribute:: texts .. py:attribute:: configItem .. py:attribute:: configName .. py:attribute:: choiceLabel .. py:attribute:: buttonGroup .. py:method:: setValue(value) select button according to the value .. py:class:: CustomColorSettingCard(configItem: qfluentwidgets.common.config.ColorConfigItem, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], title: str, content=None, parent=None, enableAlpha=False) Bases: :py:obj:`qfluentwidgets.components.settings.expand_setting_card.ExpandGroupSettingCard` Custom color setting card .. py:attribute:: colorChanged .. py:attribute:: enableAlpha .. py:attribute:: configItem .. py:attribute:: defaultColor .. py:attribute:: customColor .. py:attribute:: choiceLabel .. py:attribute:: radioWidget .. py:attribute:: radioLayout .. py:attribute:: defaultRadioButton .. py:attribute:: customRadioButton .. py:attribute:: buttonGroup .. py:attribute:: customColorWidget .. py:attribute:: customColorLayout .. py:attribute:: customLabel .. py:attribute:: chooseColorButton .. py:class:: SettingCardGroup(title: str, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Setting card group .. py:attribute:: titleLabel .. py:attribute:: vBoxLayout .. py:attribute:: cardLayout .. py:method:: addSettingCard(card: PyQt5.QtWidgets.QWidget) add setting card to group .. py:method:: addSettingCards(cards: List[PyQt5.QtWidgets.QWidget]) add setting cards to group .. py:method:: adjustSize() .. py:class:: DropDownPushButton(*args, **kwargs) Bases: :py:obj:`DropDownButtonBase`, :py:obj:`PushButton` Drop down push button Constructors ------------ * DropDownPushButton(`parent`: QWidget = None) * DropDownPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * DropDownPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: DropDownToolButton(*args, **kwargs) Bases: :py:obj:`DropDownButtonBase`, :py:obj:`ToolButton` Drop down tool button Constructors ------------ * DropDownToolButton(`parent`: QWidget = None) * DropDownToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: PrimaryPushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PushButton` Primary color push button Constructors ------------ * PrimaryPushButton(`parent`: QWidget = None) * PrimaryPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * PrimaryPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: PushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Push button Constructors ------------ * PushButton(`parent`: QWidget = None) * PushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * PushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:attribute:: isPressed :value: False .. py:attribute:: isHover :value: False .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, str, qfluentwidgets.common.icon.FluentIconBase]) .. py:method:: icon() .. py:method:: setProperty(name: str, value) -> bool .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: paintEvent(e) .. py:class:: RadioButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QRadioButton` Radio button Constructors ------------ * RadioButton(`parent`: QWidget = None) * RadioButton(`url`: text, `text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) .. py:class:: HyperlinkButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PushButton` Hyperlink button Constructors ------------ * HyperlinkButton(`parent`: QWidget = None) * HyperlinkButton(`url`: str, `text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) .. py:method:: getUrl() .. py:method:: setUrl(url: Union[str, PyQt5.QtCore.QUrl]) .. py:attribute:: url .. py:class:: ToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Tool button Constructors ------------ * ToolButton(`parent`: QWidget = None) * ToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:attribute:: isPressed :value: False .. py:attribute:: isHover :value: False .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, str, qfluentwidgets.common.icon.FluentIconBase]) .. py:method:: icon() .. py:method:: setProperty(name: str, value) -> bool .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: paintEvent(e) .. py:class:: TransparentToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ToolButton` Transparent background tool button Constructors ------------ * TransparentToolButton(`parent`: QWidget = None) * TransparentToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: ToggleButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PushButton` Toggle push button Constructors ------------ * ToggleButton(`parent`: QWidget = None) * ToggleButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * ToggleButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: SplitWidgetBase(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Split widget base class .. py:attribute:: dropDownClicked .. py:attribute:: flyout :type: PyQt5.QtWidgets.QWidget :value: None .. py:attribute:: dropButton .. py:attribute:: hBoxLayout .. py:method:: setWidget(widget: PyQt5.QtWidgets.QWidget) set the widget on left side .. py:method:: setDropButton(button) set drop dow button .. py:method:: setDropIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase]) set the icon of drop down button .. py:method:: setDropIconSize(size: PyQt5.QtCore.QSize) set the icon size of drop down button .. py:method:: 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 .. py:method:: showFlyout() show flyout .. py:class:: SplitPushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`SplitWidgetBase` Split push button Constructors ------------ * SplitPushButton(`parent`: QWidget = None) * SplitPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) .. py:attribute:: clicked .. py:attribute:: button .. py:method:: text() .. py:method:: setText(text: str) .. py:method:: icon() .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase, str]) .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:attribute:: text_ .. py:attribute:: icon_ .. py:class:: SplitToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`SplitWidgetBase` Split tool button Constructors ------------ * SplitToolButton(`parent`: QWidget = None) * SplitToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:attribute:: clicked .. py:attribute:: button .. py:method:: icon() .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase, str]) .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:attribute:: icon_ .. py:class:: PrimaryToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ToolButton` Primary color tool button Constructors ------------ * PrimaryToolButton(`parent`: QWidget = None) * PrimaryToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: PrimarySplitPushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`SplitPushButton` Primary split push button Constructors ------------ * PrimarySplitPushButton(`parent`: QWidget = None) * PrimarySplitPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * PrimarySplitPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: PrimarySplitToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`SplitToolButton` Primary split push button Constructors ------------ * PrimarySplitToolButton(`parent`: QWidget = None) * PrimarySplitToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: PrimaryDropDownPushButton(*args, **kwargs) Bases: :py:obj:`PrimaryDropDownButtonBase`, :py:obj:`PrimaryPushButton` Primary color drop down push button Constructors ------------ * PrimaryDropDownPushButton(`parent`: QWidget = None) * PrimaryDropDownPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * PrimaryDropDownPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: PrimaryDropDownToolButton(*args, **kwargs) Bases: :py:obj:`PrimaryDropDownButtonBase`, :py:obj:`PrimaryToolButton` Primary drop down tool button Constructors ------------ * PrimaryDropDownToolButton(`parent`: QWidget = None) * PrimaryDropDownToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:data:: TogglePushButton .. py:class:: ToggleToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ToolButton` Toggle tool button Constructors ------------ * ToggleToolButton(`parent`: QWidget = None) * ToggleToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: TransparentPushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PushButton` Transparent push button Constructors ------------ * TransparentPushButton(`parent`: QWidget = None) * TransparentPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * TransparentPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: TransparentTogglePushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`TogglePushButton` Transparent toggle push button Constructors ------------ * TransparentTogglePushButton(`parent`: QWidget = None) * TransparentTogglePushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * TransparentTogglePushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: TransparentToggleToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ToggleToolButton` Transparent toggle tool button Constructors ------------ * TransparentToggleToolButton(`parent`: QWidget = None) * TransparentToggleToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: TransparentDropDownPushButton(*args, **kwargs) Bases: :py:obj:`DropDownPushButton` Transparent drop down push button Constructors ------------ * TransparentDropDownPushButton(`parent`: QWidget = None) * TransparentDropDownPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * TransparentDropDownPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:class:: TransparentDropDownToolButton(*args, **kwargs) Bases: :py:obj:`DropDownToolButton` Transparent drop down tool button Constructors ------------ * TransparentDropDownToolButton(`parent`: QWidget = None) * TransparentDropDownToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:class:: PillPushButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`TogglePushButton`, :py:obj:`PillButtonBase` Pill push button Constructors ------------ * PillPushButton(`parent`: QWidget = None) * PillPushButton(`text`: str, `parent`: QWidget = None, `icon`: QIcon | str | FluentIconBase = None) * PillPushButton(`icon`: QIcon | FluentIcon, `text`: str, `parent`: QWidget = None) .. py:method:: paintEvent(e) .. py:class:: PillToolButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ToggleToolButton`, :py:obj:`PillButtonBase` Pill push button Constructors ------------ * PillToolButton(`parent`: QWidget = None) * PillToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:method:: paintEvent(e) .. py:class:: CardWidget(parent=None) Bases: :py:obj:`qfluentwidgets.common.animation.BackgroundAnimationWidget`, :py:obj:`PyQt5.QtWidgets.QFrame` Card widget .. py:attribute:: clicked .. py:method:: mouseReleaseEvent(e) .. py:method:: setClickEnabled(isEnabled: bool) .. py:method:: isClickEnabled() .. py:method:: getBorderRadius() .. py:method:: setBorderRadius(radius: int) .. py:method:: paintEvent(e) .. py:attribute:: borderRadius .. py:class:: ElevatedCardWidget(parent=None) Bases: :py:obj:`SimpleCardWidget` Card widget with shadow effect .. py:attribute:: shadowAni .. py:attribute:: elevatedAni .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:class:: SimpleCardWidget(parent=None) Bases: :py:obj:`CardWidget` Simple card widget .. py:method:: paintEvent(e) .. py:class:: HeaderCardWidget(parent=None) Bases: :py:obj:`SimpleCardWidget` Header card widget .. py:attribute:: headerView .. py:attribute:: headerLabel .. py:attribute:: separator .. py:attribute:: view .. py:attribute:: vBoxLayout .. py:attribute:: headerLayout .. py:attribute:: viewLayout .. py:method:: getTitle() .. py:method:: setTitle(title: str) .. py:attribute:: title .. py:class:: CardGroupWidget(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon], title: str, content: str, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` .. py:attribute:: vBoxLayout .. py:attribute:: hBoxLayout .. py:attribute:: iconWidget .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: textLayout .. py:attribute:: separator .. py:method:: title() .. py:method:: setTitle(text: str) .. py:method:: content() .. py:method:: setContent(text: str) .. py:method:: icon() .. py:method:: setIcon(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon]) .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: setSeparatorVisible(isVisible: bool) .. py:method:: isSeparatorVisible() .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0) .. py:class:: GroupHeaderCardWidget(parent=None) Bases: :py:obj:`HeaderCardWidget` Group header card widget .. py:method:: addGroup(icon: Union[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 .. py:method:: groupCount() .. py:class:: CheckBox(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QCheckBox` Check box Constructors ------------ * CheckBox(`parent`: QWidget = None) * CheckBox(`text`: str, `parent`: QWidget = None) .. py:attribute:: isPressed :value: False .. py:attribute:: isHover :value: False .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: paintEvent(e) .. py:class:: ComboBox(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton`, :py:obj:`ComboBoxBase` Combo box .. py:attribute:: currentIndexChanged .. py:attribute:: currentTextChanged .. py:attribute:: activated .. py:attribute:: textActivated .. py:attribute:: arrowAni .. py:method:: setPlaceholderText(text: str) .. py:method:: setCurrentIndex(index: int) set current index Parameters ---------- index: int current index .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: EditableComboBox(parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.line_edit.LineEdit`, :py:obj:`ComboBoxBase` Editable combo box .. py:attribute:: currentIndexChanged .. py:attribute:: currentTextChanged .. py:attribute:: activated .. py:attribute:: textActivated .. py:attribute:: dropButton .. py:method:: setCompleterMenu(menu) set completer menu Parameters ---------- menu: CompleterMenu completer menu .. py:method:: currentText() .. py:method:: setCurrentIndex(index: int) set current index Parameters ---------- index: int current index .. py:method:: clear() Clears the combobox, removing all items. .. py:method:: setPlaceholderText(text: str) .. py:class:: CommandBar(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Command bar .. py:attribute:: moreButton .. py:method:: setSpaing(spacing: int) .. py:method:: spacing() .. py:method:: addAction(action: PyQt5.QtWidgets.QAction) add action Parameters ---------- action: QAction the action to add .. py:method:: addActions(actions: Iterable[PyQt5.QtWidgets.QAction]) .. py:method:: addHiddenAction(action: PyQt5.QtWidgets.QAction) add hidden action .. py:method:: addHiddenActions(actions: List[PyQt5.QtWidgets.QAction]) add hidden action .. py:method:: insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction) .. py:method:: addSeparator() .. py:method:: insertSeparator(index: int) .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget) add widget to command bar .. py:method:: removeAction(action: PyQt5.QtWidgets.QAction) .. py:method:: removeWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: removeHiddenAction(action: PyQt5.QtWidgets.QAction) .. py:method:: setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle) set the style of tool button .. py:method:: toolButtonStyle() .. py:method:: setButtonTight(isTight: bool) .. py:method:: isButtonTight() .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: iconSize() .. py:method:: resizeEvent(e) .. py:method:: minimumSizeHint() -> PyQt5.QtCore.QSize .. py:method:: updateGeometry() .. py:method:: suitableWidth() .. py:method:: resizeToSuitableWidth() .. py:method:: setFont(font: PyQt5.QtGui.QFont) .. py:property:: commandButtons .. py:method:: setMenuDropDown(down: bool) set the animation direction of more actions menu .. py:method:: isMenuDropDown() .. py:class:: CommandButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.TransparentToggleToolButton` Command button Constructors ------------ * CommandButton(`parent`: QWidget = None) * CommandButton(`icon`: QIcon | str | FluentIconBase = None, `parent`: QWidget = None) .. py:method:: setTight(isTight: bool) .. py:method:: isTight() .. py:method:: sizeHint() -> PyQt5.QtCore.QSize .. py:method:: isIconOnly() .. py:method:: text() .. py:method:: setText(text: str) .. py:method:: setAction(action: PyQt5.QtWidgets.QAction) .. py:method:: action() .. py:method:: paintEvent(e) .. py:class:: CommandBarView(parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.flyout.FlyoutViewBase` Command bar view .. py:attribute:: bar .. py:attribute:: hBoxLayout .. py:method:: setMenuVisible(isVisible) .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: setSpaing(spacing: int) .. py:method:: spacing() .. py:method:: addAction(action: PyQt5.QtWidgets.QAction) .. py:method:: addActions(actions: Iterable[PyQt5.QtWidgets.QAction]) .. py:method:: addHiddenAction(action: PyQt5.QtWidgets.QAction) .. py:method:: addHiddenActions(actions: List[PyQt5.QtWidgets.QAction]) .. py:method:: insertAction(before: PyQt5.QtWidgets.QAction, action: PyQt5.QtWidgets.QAction) .. py:method:: addSeparator() .. py:method:: insertSeparator(index: int) .. py:method:: removeAction(action: PyQt5.QtWidgets.QAction) .. py:method:: removeWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: removeHiddenAction(action: PyQt5.QtWidgets.QAction) .. py:method:: setToolButtonStyle(style: PyQt5.QtCore.Qt.ToolButtonStyle) .. py:method:: toolButtonStyle() .. py:method:: setButtonTight(isTight: bool) .. py:method:: isButtonTight() .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: iconSize() .. py:method:: setFont(font: PyQt5.QtGui.QFont) .. py:method:: setMenuDropDown(down: bool) .. py:method:: suitableWidth() .. py:method:: resizeToSuitableWidth() .. py:method:: actions() .. py:method:: paintEvent(e) .. py:class:: FlipView(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QListWidget` Flip view Constructors ------------ * FlipView(`parent`: QWidget = None) * FlipView(`orient`: Qt.Orientation, `parent`: QWidget = None) .. py:attribute:: currentIndexChanged .. py:attribute:: orientation .. py:method:: isHorizontal() .. py:method:: setItemSize(size: PyQt5.QtCore.QSize) set the size of item .. py:method:: getItemSize() get the size of item .. py:method:: setBorderRadius(radius: int) set the border radius of item .. py:method:: getBorderRadius() .. py:method:: scrollPrevious() scroll to previous item .. py:method:: scrollNext() scroll to next item .. py:method:: setCurrentIndex(index: int) set current index .. py:method:: scrollToIndex(index) .. py:method:: currentIndex() .. py:method:: image(index: int) .. py:method:: addImage(image: Union[PyQt5.QtGui.QImage, PyQt5.QtGui.QPixmap, str]) add image .. py:method:: addImages(images: List[Union[PyQt5.QtGui.QImage, PyQt5.QtGui.QPixmap, str]], targetSize: PyQt5.QtCore.QSize = None) add images .. py:method:: setItemImage(index: int, image: Union[PyQt5.QtGui.QImage, PyQt5.QtGui.QPixmap, str], targetSize: PyQt5.QtCore.QSize = None) set the image of specified item .. py:method:: 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 .. py:method:: resizeEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: showEvent(e) .. py:method:: wheelEvent(e: PyQt5.QtGui.QWheelEvent) .. py:method:: getAspectRatioMode() .. py:method:: setAspectRatioMode(mode: PyQt5.QtCore.Qt.AspectRatioMode) .. py:attribute:: itemSize .. py:attribute:: borderRadius .. py:attribute:: aspectRatioMode .. py:class:: HorizontalFlipView(parent=None) Bases: :py:obj:`FlipView` Horizontal flip view .. py:class:: VerticalFlipView(parent=None) Bases: :py:obj:`FlipView` Vertical flip view .. py:class:: FlipImageDelegate(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` Flip view image delegate .. py:attribute:: borderRadius :value: 0 .. py:method:: itemSize(index: int) .. py:method:: setBorderRadius(radius: int) .. py:method:: paint(painter: PyQt5.QtGui.QPainter, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:class:: LineEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QLineEdit` Line edit .. py:attribute:: leftButtons :type: List[LineEditButton] :value: [] .. py:attribute:: rightButtons :type: List[LineEditButton] :value: [] .. py:attribute:: hBoxLayout .. py:attribute:: clearButton .. py:method:: setClearButtonEnabled(enable: bool) .. py:method:: isClearButtonEnabled() -> bool .. py:method:: setCompleter(completer: PyQt5.QtWidgets.QCompleter) .. py:method:: completer() .. py:method:: addAction(action: PyQt5.QtWidgets.QAction, position=QLineEdit.ActionPosition.TrailingPosition) .. py:method:: addActions(actions, position=QLineEdit.ActionPosition.TrailingPosition) .. py:method:: focusOutEvent(e) .. py:method:: focusInEvent(e) .. py:method:: setCompleterMenu(menu) set completer menu Parameters ---------- menu: CompleterMenu completer menu .. py:method:: contextMenuEvent(e) .. py:method:: paintEvent(e) .. py:class:: TextEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTextEdit` Text edit .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: PlainTextEdit(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPlainTextEdit` Plain text edit .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: LineEditButton(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Line edit button .. py:attribute:: isPressed :value: False .. py:method:: setAction(action: PyQt5.QtWidgets.QAction) .. py:method:: action() .. py:method:: setIcon(icon: Union[str, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon]) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: SearchLineEdit(parent=None) Bases: :py:obj:`LineEdit` Search line edit .. py:attribute:: searchSignal .. py:attribute:: clearSignal .. py:attribute:: searchButton .. py:method:: search() emit search signal .. py:method:: setClearButtonEnabled(enable: bool) .. py:class:: PasswordLineEdit(parent=None) Bases: :py:obj:`LineEdit` Password line edit .. py:attribute:: viewButton .. py:method:: setPasswordVisible(isVisible: bool) set the visibility of password .. py:method:: isPasswordVisible() .. py:method:: setClearButtonEnabled(enable: bool) .. py:method:: setViewPasswordButtonVisible(isVisible: bool) set the visibility of view password button .. py:method:: eventFilter(obj, e) .. py:method:: inputMethodQuery(query: PyQt5.QtCore.Qt.InputMethodQuery) .. py:attribute:: passwordVisible .. py:class:: TextBrowser(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTextBrowser` Text browser .. py:attribute:: layer .. py:attribute:: scrollDelegate .. py:method:: contextMenuEvent(e) .. py:class:: IconWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Icon widget Constructors ------------ * IconWidget(`parent`: QWidget = None) * IconWidget(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:method:: getIcon() .. py:method:: setIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase]) .. py:method:: paintEvent(e) .. py:attribute:: icon .. py:class:: PixmapLabel(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QLabel` Label for high dpi pixmap .. py:method:: setPixmap(pixmap: PyQt5.QtGui.QPixmap) .. py:method:: pixmap() .. py:method:: paintEvent(e) .. py:class:: CaptionLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Caption text label Constructors ------------ * CaptionLabel(`parent`: QWidget = None) * CaptionLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: StrongBodyLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Strong body text label Constructors ------------ * StrongBodyLabel(`parent`: QWidget = None) * StrongBodyLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: BodyLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Body text label Constructors ------------ * BodyLabel(`parent`: QWidget = None) * BodyLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: SubtitleLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Subtitle text label Constructors ------------ * SubtitleLabel(`parent`: QWidget = None) * SubtitleLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: TitleLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Sub title text label Constructors ------------ * TitleLabel(`parent`: QWidget = None) * TitleLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: LargeTitleLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Large title text label Constructors ------------ * LargeTitleLabel(`parent`: QWidget = None) * LargeTitleLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: DisplayLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`FluentLabelBase` Display text label Constructors ------------ * DisplayLabel(`parent`: QWidget = None) * DisplayLabel(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() .. py:class:: FluentLabelBase(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QLabel` Fluent label base class Constructors ------------ * FluentLabelBase(`parent`: QWidget = None) * FluentLabelBase(`text`: str, `parent`: QWidget = None) .. py:method:: getFont() :abstractmethod: .. py:method:: 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 .. py:method:: lightColor() .. py:method:: darkColor() .. py:method:: pixelFontSize() .. py:method:: strikeOut() .. py:method:: underline() .. py:class:: ImageLabel(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QLabel` Image label Constructors ------------ * ImageLabel(`parent`: QWidget = None) * ImageLabel(`image`: str | QImage | QPixmap, `parent`: QWidget = None) .. py:attribute:: clicked .. py:attribute:: image .. py:method:: setBorderRadius(topLeft: int, topRight: int, bottomLeft: int, bottomRight: int) set the border radius of image .. py:method:: setImage(image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None) set the image of label .. py:method:: scaledToWidth(width: int) .. py:method:: scaledToHeight(height: int) .. py:method:: setScaledSize(size: PyQt5.QtCore.QSize) .. py:method:: isNull() .. py:method:: mouseReleaseEvent(e) .. py:method:: setPixmap(pixmap: PyQt5.QtGui.QPixmap) .. py:method:: pixmap() -> PyQt5.QtGui.QPixmap .. py:method:: setMovie(movie: PyQt5.QtGui.QMovie) .. py:method:: paintEvent(e) .. py:method:: topLeftRadius() .. py:method:: topRightRadius() .. py:method:: bottomLeftRadius() .. py:method:: bottomRightRadius() .. py:class:: AvatarWidget(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`ImageLabel` Avatar widget Constructors ------------ * AvatarWidget(`parent`: QWidget = None) * AvatarWidget(`image`: str | QImage | QPixmap, `parent`: QWidget = None) .. py:method:: getRadius() .. py:method:: setRadius(radius: int) .. py:method:: paintEvent(e) .. py:attribute:: radius .. py:class:: HyperlinkLabel(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Hyperlink label Constructors ------------ * HyperlinkLabel(`parent`: QWidget = None) * HyperlinkLabel(`text`: str, `parent`: QWidget = None) * HyperlinkLabel(`url`: QUrl, `parent`: QWidget = None) .. py:method:: getUrl() -> PyQt5.QtCore.QUrl .. py:method:: setUrl(url: Union[PyQt5.QtCore.QUrl, str]) .. py:method:: isUnderlineVisible() .. py:method:: setUnderlineVisible(isVisible: bool) .. py:attribute:: url .. py:attribute:: underlineVisible .. py:class:: ListWidget(parent=None) Bases: :py:obj:`ListBase`, :py:obj:`PyQt5.QtWidgets.QListWidget` List widget .. py:method:: setCurrentItem(item: PyQt5.QtWidgets.QListWidgetItem, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: setCurrentRow(row: int, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow .. py:class:: ListView(parent=None) Bases: :py:obj:`ListBase`, :py:obj:`PyQt5.QtWidgets.QListView` List view .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow .. py:class:: ListItemDelegate(parent: PyQt5.QtWidgets.QListView) Bases: :py:obj:`qfluentwidgets.components.widgets.table_view.TableItemDelegate` List item delegate .. py:class:: DWMMenu(title='', parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QMenu` A menu with DWM shadow .. py:attribute:: windowEffect .. py:method:: event(e: PyQt5.QtCore.QEvent) .. py:class:: LineEditMenu(parent: PyQt5.QtWidgets.QLineEdit) Bases: :py:obj:`EditMenu` Line edit menu .. py:attribute:: selectionStart .. py:attribute:: selectionLength .. py:class:: RoundMenu(title='', parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QMenu` Round corner menu .. py:attribute:: closedSignal .. py:attribute:: isSubMenu :value: False .. py:attribute:: parentMenu :value: None .. py:attribute:: menuItem :value: None .. py:attribute:: lastHoverItem :value: None .. py:attribute:: lastHoverSubMenuItem :value: None .. py:attribute:: isHideBySystem :value: True .. py:attribute:: itemHeight :value: 28 .. py:attribute:: hBoxLayout .. py:attribute:: view .. py:attribute:: aniManager :value: None .. py:attribute:: timer .. py:method:: setMaxVisibleItems(num: int) set the maximum visible items .. py:method:: setItemHeight(height) set the height of menu item .. py:method:: setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30)) add shadow to dialog .. py:method:: adjustSize() .. py:method:: icon() .. py:method:: title() .. py:method:: clear() clear all actions .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase]) set the icon of menu .. py:method:: addAction(action: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]) add action to menu Parameters ---------- action: QAction menu action .. py:method:: 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 .. py:method:: insertAction(before: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action], action: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]) inserts action to menu, before the action before .. py:method:: addActions(actions: List[Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]]) add actions to menu Parameters ---------- actions: Iterable[QAction] menu actions .. py:method:: insertActions(before: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action], actions: List[Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]]) inserts the actions actions to menu, before the action before .. py:method:: removeAction(action: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]) remove action from menu .. py:method:: removeMenu(menu) remove submenu .. py:method:: setDefaultAction(action: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action]) set the default action .. py:method:: addMenu(menu) add sub menu Parameters ---------- menu: RoundMenu sub round menu .. py:method:: insertMenu(before: Union[PyQt5.QtWidgets.QAction, qfluentwidgets.common.icon.Action], menu) insert menu before action `before` .. py:method:: addSeparator() add seperator to menu .. py:method:: hideEvent(e) .. py:method:: closeEvent(e) .. py:method:: menuActions() .. py:method:: mousePressEvent(e) .. py:method:: mouseMoveEvent(e) .. py:method:: 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 .. py:method:: 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 .. py:method:: adjustPosition() .. py:method:: paintEvent(e) .. py:class:: MenuAnimationManager(menu: RoundMenu) Bases: :py:obj:`PyQt5.QtCore.QObject` Menu animation manager .. py:attribute:: managers .. py:attribute:: menu .. py:attribute:: ani .. py:method:: availableViewSize(pos: PyQt5.QtCore.QPoint) Return the available size of view .. py:method:: exec(pos: PyQt5.QtCore.QPoint) .. py:method:: register(name) :classmethod: register menu animation manager Parameters ---------- name: Any the name of manager, it should be unique .. py:method:: make(menu: RoundMenu, aniType: MenuAnimationType) :classmethod: .. py:class:: MenuAnimationType Bases: :py:obj:`enum.Enum` Menu animation type .. py:attribute:: NONE :value: 0 .. py:attribute:: DROP_DOWN :value: 1 .. py:attribute:: PULL_UP :value: 2 .. py:attribute:: FADE_IN_DROP_DOWN :value: 3 .. py:attribute:: FADE_IN_PULL_UP :value: 4 .. py:class:: IndicatorMenuItemDelegate Bases: :py:obj:`MenuItemDelegate` Menu item delegate with indicator .. py:method:: paint(painter: PyQt5.QtGui.QPainter, option, index) .. py:class:: MenuItemDelegate Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` Menu item delegate .. py:method:: paint(painter, option, index) .. py:class:: ShortcutMenuItemDelegate Bases: :py:obj:`MenuItemDelegate` Shortcut key menu item delegate .. py:method:: paint(painter: PyQt5.QtGui.QPainter, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:class:: CheckableMenu(title='', parent=None, indicatorType=MenuIndicatorType.CHECK) Bases: :py:obj:`RoundMenu` Checkable menu .. py:class:: MenuIndicatorType Bases: :py:obj:`enum.Enum` Menu indicator type .. py:attribute:: CHECK :value: 0 .. py:attribute:: RADIO :value: 1 .. py:class:: SystemTrayMenu(title='', parent=None) Bases: :py:obj:`RoundMenu` System tray menu .. py:method:: sizeHint() -> PyQt5.QtCore.QSize .. py:class:: CheckableSystemTrayMenu(title='', parent=None, indicatorType=MenuIndicatorType.CHECK) Bases: :py:obj:`CheckableMenu` Checkable system tray menu .. py:method:: sizeHint() -> PyQt5.QtCore.QSize .. py:class:: InfoBar(icon: Union[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: :py:obj:`PyQt5.QtWidgets.QFrame` Information bar .. py:attribute:: closedSignal .. py:attribute:: title .. py:attribute:: content .. py:attribute:: orient .. py:attribute:: icon .. py:attribute:: duration .. py:attribute:: isClosable .. py:attribute:: position .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: closeButton .. py:attribute:: iconWidget .. py:attribute:: hBoxLayout .. py:attribute:: textLayout .. py:attribute:: widgetLayout .. py:attribute:: opacityEffect .. py:attribute:: opacityAni .. py:attribute:: lightBackgroundColor :value: None .. py:attribute:: darkBackgroundColor :value: None .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0) add widget to info bar .. py:method:: setCustomBackgroundColor(light, dark) set the custom background color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor background color in light/dark theme mode .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: closeEvent(e) .. py:method:: showEvent(e) .. py:method:: paintEvent(e) .. py:method:: new(icon, title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: info(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: success(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: warning(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: error(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:class:: InfoBarIcon Bases: :py:obj:`qfluentwidgets.common.icon.FluentIconBase`, :py:obj:`enum.Enum` Info bar icon .. py:attribute:: INFORMATION :value: 'Info' .. py:attribute:: SUCCESS :value: 'Success' .. py:attribute:: WARNING :value: 'Warning' .. py:attribute:: ERROR :value: 'Error' .. py:method:: path(theme=Theme.AUTO) get the path of icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` .. py:class:: InfoBarPosition Bases: :py:obj:`enum.Enum` Info bar position .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: TOP_LEFT :value: 2 .. py:attribute:: TOP_RIGHT :value: 3 .. py:attribute:: BOTTOM_LEFT :value: 4 .. py:attribute:: BOTTOM_RIGHT :value: 5 .. py:attribute:: NONE :value: 6 .. py:class:: InfoBarManager Bases: :py:obj:`PyQt5.QtCore.QObject` Info bar manager .. py:attribute:: managers .. py:attribute:: spacing :value: 16 .. py:attribute:: margin :value: 24 .. py:attribute:: infoBars .. py:attribute:: aniGroups .. py:attribute:: slideAnis :value: [] .. py:attribute:: dropAnis :value: [] .. py:method:: add(infoBar: InfoBar) add info bar .. py:method:: remove(infoBar: InfoBar) remove info bar .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: register(name) :classmethod: register menu animation manager Parameters ---------- name: Any the name of manager, it should be unique .. py:method:: make(position: InfoBarPosition) :classmethod: mask info bar manager according to the display position .. py:class:: InfoBadge(parent: PyQt5.QtWidgets.QWidget = None, level=InfoLevel.ATTENTION) Bases: :py:obj:`PyQt5.QtWidgets.QLabel` Information badge Constructors ------------ * InfoBadge(`parent`: QWidget = None, `level`=InfoLevel.ATTENTION) * InfoBadge(`text`: str, `parent`: QWidget = None, `level`=InfoLevel.ATTENTION) * InfoBadge(`num`: int, `parent`: QWidget = None, `level`=InfoLevel.ATTENTION) * InfoBadge(`num`: float, `parent`: QWidget = None, `level`=InfoLevel.ATTENTION) .. py:attribute:: level .. py:attribute:: lightBackgroundColor :value: None .. py:attribute:: darkBackgroundColor :value: None .. py:attribute:: manager :type: InfoBadgeManager :value: None .. py:method:: setLevel(level: InfoLevel) set infomation level .. py:method:: setProperty(name: str, value) .. py:method:: setCustomBackgroundColor(light, dark) set the custom background color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor background color in light/dark theme mode .. py:method:: paintEvent(e) .. py:method:: make(text: Union[str, float], parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: info(text: Union[str, float], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: success(text: Union[str, float], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: attension(text: Union[str, float], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: warning(text: Union[str, float], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: error(text: Union[str, float], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: custom(text: Union[str, float], light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: 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 .. py:class:: InfoLevel Bases: :py:obj:`enum.Enum` Info level .. py:attribute:: INFOAMTION :value: 'Info' .. py:attribute:: SUCCESS :value: 'Success' .. py:attribute:: ATTENTION :value: 'Attension' .. py:attribute:: WARNING :value: 'Warning' .. py:attribute:: ERROR :value: 'Error' .. py:class:: DotInfoBadge(parent=None, level=InfoLevel.ATTENTION) Bases: :py:obj:`InfoBadge` Dot info badge .. py:method:: paintEvent(e) .. py:method:: make(parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: info(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: success(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: attension(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: warning(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: error(parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: custom(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor, parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: 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 .. py:class:: IconInfoBadge(parent: PyQt5.QtWidgets.QWidget = None, level=InfoLevel.ATTENTION) Bases: :py:obj:`InfoBadge` Icon icon badge Constructors ------------ * IconInfoBadge(`parent`: QWidget = None, `level`=InfoLevel.ATTENTION) * IconInfoBadge(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None, `level`=InfoLevel.ATTENTION) .. py:method:: setIcon(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase, str]) set the icon of info badge .. py:method:: icon() .. py:method:: iconSize() .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: paintEvent(e) .. py:method:: make(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, level=InfoLevel.INFOAMTION, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: info(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: success(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: attension(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: warning(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: error(icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, target: PyQt5.QtWidgets.QWidget = None, position=InfoBadgePosition.TOP_RIGHT) :classmethod: .. py:method:: custom(icon: Union[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) :classmethod: 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 .. py:class:: InfoBadgePosition Bases: :py:obj:`enum.Enum` Info badge position .. py:attribute:: TOP_RIGHT :value: 0 .. py:attribute:: BOTTOM_RIGHT :value: 1 .. py:attribute:: RIGHT :value: 2 .. py:attribute:: TOP_LEFT :value: 3 .. py:attribute:: BOTTOM_LEFT :value: 4 .. py:attribute:: LEFT :value: 5 .. py:attribute:: NAVIGATION_ITEM :value: 6 .. py:class:: InfoBadgeManager(target: PyQt5.QtWidgets.QWidget, badge: InfoBadge) Bases: :py:obj:`PyQt5.QtCore.QObject` Info badge manager .. py:attribute:: managers .. py:attribute:: target .. py:attribute:: badge .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: register(name) :classmethod: register menu animation manager Parameters ---------- name: Any the name of manager, it should be unique .. py:method:: make(position: InfoBadgePosition, target: PyQt5.QtWidgets.QWidget, badge: InfoBadge) :classmethod: mask info badge manager .. py:method:: position() return the position of info badge .. py:class:: SingleDirectionScrollArea(parent=None, orient=Qt.Vertical) Bases: :py:obj:`PyQt5.QtWidgets.QScrollArea` Single direction scroll area .. py:attribute:: orient .. py:attribute:: smoothScroll .. py:attribute:: vScrollBar .. py:attribute:: hScrollBar .. py:method:: setVerticalScrollBarPolicy(policy) .. py:method:: setHorizontalScrollBarPolicy(policy) .. py:method:: setSmoothMode(mode) set smooth mode Parameters ---------- mode: SmoothMode smooth scroll mode .. py:method:: keyPressEvent(e) .. py:method:: wheelEvent(e: PyQt5.QtGui.QWheelEvent) .. py:method:: enableTransparentBackground() .. py:class:: SmoothMode Bases: :py:obj:`enum.Enum` Smooth mode .. py:attribute:: NO_SMOOTH :value: 0 .. py:attribute:: CONSTANT :value: 1 .. py:attribute:: LINEAR :value: 2 .. py:attribute:: QUADRATI :value: 3 .. py:attribute:: COSINE :value: 4 .. py:class:: SmoothScrollArea(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QScrollArea` Smooth scroll area .. py:attribute:: delegate .. py:method:: setScrollAnimation(orient, duration, easing=QEasingCurve.OutCubic) set scroll animation Parameters ---------- orient: Orient scroll orientation duration: int scroll duration easing: QEasingCurve animation type .. py:method:: enableTransparentBackground() .. py:class:: ScrollArea(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QScrollArea` Smooth scroll area .. py:attribute:: scrollDelagate .. py:method:: enableTransparentBackground() .. py:class:: Slider(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`PyQt5.QtWidgets.QSlider` A slider can be clicked Constructors ------------ * Slider(`parent`: QWidget = None) * Slider(`orient`: Qt.Orientation, `parent`: QWidget = None) .. py:attribute:: clicked .. py:method:: setOrientation(orientation: PyQt5.QtCore.Qt.Orientation) -> None .. py:method:: mousePressEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent) .. py:property:: grooveLength .. py:method:: paintEvent(e) .. py:method:: resizeEvent(e) .. py:class:: HollowHandleStyle(config: dict = None) Bases: :py:obj:`PyQt5.QtWidgets.QProxyStyle` Hollow handle style .. py:attribute:: config .. py:attribute:: w .. py:method:: 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 .. py:method:: drawComplexControl(cc: PyQt5.QtWidgets.QStyle.ComplexControl, opt: PyQt5.QtWidgets.QStyleOptionSlider, painter: PyQt5.QtGui.QPainter, widget: PyQt5.QtWidgets.QWidget) draw sub control .. py:class:: ClickableSlider Bases: :py:obj:`PyQt5.QtWidgets.QSlider` A slider can be clicked .. py:attribute:: clicked .. py:method:: mousePressEvent(e: PyQt5.QtGui.QMouseEvent) .. py:class:: SpinBox(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QSpinBox` Spin box .. py:class:: DoubleSpinBox(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDoubleSpinBox` Double spin box .. py:class:: DateEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateEdit` Date edit .. py:class:: DateTimeEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateTimeEdit` Date time edit .. py:class:: TimeEdit(parent=None) Bases: :py:obj:`InlineSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QTimeEdit` Time edit .. py:class:: CompactSpinBox(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QSpinBox` Compact spin box .. py:class:: CompactDoubleSpinBox(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDoubleSpinBox` Compact double spin box .. py:class:: CompactDateEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateEdit` Compact date edit .. py:class:: CompactDateTimeEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QDateTimeEdit` Compact date time edit .. py:class:: CompactTimeEdit(parent=None) Bases: :py:obj:`CompactSpinBoxBase`, :py:obj:`PyQt5.QtWidgets.QTimeEdit` Compact time edit .. py:class:: PopUpAniStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` Stacked widget with pop up animation .. py:attribute:: aniFinished .. py:attribute:: aniStart .. py:attribute:: aniInfos :type: List[PopUpAniInfo] :value: [] .. py:method:: 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 .. py:method:: removeWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: 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 .. py:method:: 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 .. py:class:: OpacityAniStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` Stacked widget with fade in and fade out animation .. py:method:: addWidget(w: PyQt5.QtWidgets.QWidget) .. py:method:: setCurrentIndex(index: int) .. py:method:: setCurrentWidget(w: PyQt5.QtWidgets.QWidget) .. py:class:: StateToolTip(title, content, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` State tooltip .. py:attribute:: closedSignal .. py:attribute:: title .. py:attribute:: content .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: rotateTimer .. py:attribute:: opacityEffect .. py:attribute:: animation .. py:attribute:: closeButton .. py:attribute:: isDone :value: False .. py:attribute:: rotateAngle :value: 0 .. py:attribute:: deltaAngle :value: 20 .. py:method:: setTitle(title: str) set the title of tooltip .. py:method:: setContent(content: str) set the content of tooltip .. py:method:: setState(isDone=False) set the state of tooltip .. py:method:: getSuitablePos() get suitable position in main window .. py:method:: paintEvent(e) paint state tooltip .. py:class:: SwitchButton(parent: PyQt5.QtWidgets.QWidget = None, indicatorPos=IndicatorPosition.LEFT) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Switch button class Constructors ------------ * SwitchButton(`parent`: QWidget = None) * SwitchButton(`text`: str = "Off", `parent`: QWidget = None, `indicatorPos`=IndicatorPosition.LEFT) .. py:attribute:: checkedChanged .. py:attribute:: indicatorPos .. py:attribute:: hBox .. py:attribute:: indicator .. py:attribute:: label .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: isChecked() .. py:method:: setChecked(isChecked) set checked state .. py:method:: toggleChecked() toggle checked state .. py:method:: getText() .. py:method:: setText(text) .. py:method:: getSpacing() .. py:method:: setSpacing(spacing) .. py:method:: getOnText() .. py:method:: setOnText(text) .. py:method:: getOffText() .. py:method:: setOffText(text) .. py:attribute:: spacing .. py:attribute:: checked .. py:attribute:: text .. py:attribute:: onText .. py:attribute:: offText .. py:class:: IndicatorPosition Bases: :py:obj:`enum.Enum` Indicator position .. py:attribute:: LEFT :value: 0 .. py:attribute:: RIGHT :value: 1 .. py:class:: TableView(parent=None) Bases: :py:obj:`TableBase`, :py:obj:`PyQt5.QtWidgets.QTableView` Table view .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow .. py:class:: TableWidget(parent=None) Bases: :py:obj:`TableBase`, :py:obj:`PyQt5.QtWidgets.QTableWidget` Table widget .. py:method:: setCurrentCell(row: int, column: int, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: setCurrentItem(item: PyQt5.QtWidgets.QTableWidgetItem, command: Union[PyQt5.QtCore.QItemSelectionModel.SelectionFlag, PyQt5.QtCore.QItemSelectionModel.SelectionFlags] = None) .. py:method:: isSelectRightClickedRow() .. py:method:: setSelectRightClickedRow(isSelect: bool) .. py:attribute:: selectRightClickedRow .. py:class:: TableItemDelegate(parent: PyQt5.QtWidgets.QTableView) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` .. py:attribute:: margin :value: 2 .. py:attribute:: hoverRow .. py:attribute:: pressedRow .. py:attribute:: selectedRows .. py:method:: setHoverRow(row: int) .. py:method:: setPressedRow(row: int) .. py:method:: setSelectedRows(indexes: List[PyQt5.QtCore.QModelIndex]) .. py:method:: sizeHint(option, index) .. py:method:: createEditor(parent: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) -> PyQt5.QtWidgets.QWidget .. py:method:: updateEditorGeometry(editor: PyQt5.QtWidgets.QWidget, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:method:: initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:method:: paint(painter, option, index) .. py:class:: ToolTip(text='', parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Tool tip .. py:attribute:: container .. py:attribute:: timer .. py:attribute:: containerLayout .. py:attribute:: label .. py:attribute:: opacityAni .. py:attribute:: shadowEffect .. py:method:: text() .. py:method:: setText(text) set text on tooltip .. py:method:: duration() .. py:method:: setDuration(duration: int) set tooltip duration in milliseconds Parameters ---------- duration: int display duration in milliseconds, if `duration <= 0`, tooltip won't disappear automatically .. py:method:: showEvent(e) .. py:method:: hideEvent(e) .. py:method:: adjustPos(widget, position: ToolTipPosition) adjust the position of tooltip relative to widget .. py:class:: ToolTipFilter(parent: PyQt5.QtWidgets.QWidget, showDelay=300, position=ToolTipPosition.TOP) Bases: :py:obj:`PyQt5.QtCore.QObject` Tool tip filter .. py:attribute:: isEnter :value: False .. py:attribute:: position .. py:attribute:: timer .. py:method:: eventFilter(obj: PyQt5.QtCore.QObject, e: PyQt5.QtCore.QEvent) -> bool .. py:method:: hideToolTip() hide tool tip .. py:method:: showToolTip() show tool tip .. py:method:: setToolTipDelay(delay: int) set the delay of tool tip .. py:class:: ToolTipPosition Bases: :py:obj:`enum.Enum` Info bar position .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: LEFT :value: 2 .. py:attribute:: RIGHT :value: 3 .. py:attribute:: TOP_LEFT :value: 4 .. py:attribute:: TOP_RIGHT :value: 5 .. py:attribute:: BOTTOM_LEFT :value: 6 .. py:attribute:: BOTTOM_RIGHT :value: 7 .. py:class:: TreeWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTreeWidget`, :py:obj:`TreeViewBase` Tree widget .. py:class:: TreeView(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTreeView`, :py:obj:`TreeViewBase` Tree view .. py:class:: TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` Tree item delegate .. py:method:: paint(painter, option, index) .. py:method:: initStyleOption(option, index) .. py:class:: CycleListWidget(items: Iterable, itemSize: PyQt5.QtCore.QSize, align=Qt.AlignCenter, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QListWidget` Cycle list widget .. py:attribute:: currentItemChanged .. py:attribute:: itemSize .. py:attribute:: align .. py:attribute:: upButton .. py:attribute:: downButton .. py:attribute:: scrollDuration :value: 250 .. py:attribute:: originItems .. py:attribute:: vScrollBar .. py:attribute:: visibleNumber :value: 9 .. py:method:: 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 .. py:method:: setSelectedItem(text: str) set the selected item .. py:method:: scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter) scroll to item .. py:method:: wheelEvent(e) .. py:method:: scrollDown() scroll down an item .. py:method:: scrollUp() scroll up an item .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: resizeEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: currentItem() .. py:method:: currentIndex() .. py:method:: setCurrentIndex(index: int) .. py:class:: IndeterminateProgressBar(parent=None, start=True) Bases: :py:obj:`PyQt5.QtWidgets.QProgressBar` Indeterminate progress bar .. py:attribute:: shortBarAni .. py:attribute:: longBarAni .. py:attribute:: aniGroup .. py:attribute:: longBarAniGroup .. py:method:: lightBarColor() .. py:method:: darkBarColor() .. py:method:: setCustomBarColor(light, dark) set the custom bar color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor bar color in light/dark theme mode .. py:method:: shortPos() .. py:method:: longPos() .. py:method:: start() .. py:method:: stop() .. py:method:: isStarted() .. py:method:: pause() .. py:method:: resume() .. py:method:: setPaused(isPaused: bool) .. py:method:: isPaused() .. py:method:: error() .. py:method:: setError(isError: bool) .. py:method:: isError() .. py:method:: barColor() .. py:method:: paintEvent(e) .. py:class:: ProgressBar(parent=None, useAni=True) Bases: :py:obj:`PyQt5.QtWidgets.QProgressBar` .. py:attribute:: lightBackgroundColor .. py:attribute:: darkBackgroundColor .. py:attribute:: ani .. py:method:: getVal() .. py:method:: setVal(v: float) .. py:method:: isUseAni() .. py:method:: setUseAni(isUSe: bool) .. py:method:: lightBarColor() .. py:method:: darkBarColor() .. py:method:: setCustomBarColor(light, dark) set the custom bar color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor bar color in light/dark theme mode .. py:method:: setCustomBackgroundColor(light, dark) set the custom background color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor background color in light/dark theme mode .. py:method:: resume() .. py:method:: pause() .. py:method:: setPaused(isPaused: bool) .. py:method:: isPaused() .. py:method:: error() .. py:method:: setError(isError: bool) .. py:method:: isError() .. py:method:: barColor() .. py:method:: valText() .. py:method:: paintEvent(e) .. py:attribute:: useAni .. py:attribute:: val .. py:class:: ProgressRing(parent=None, useAni=True) Bases: :py:obj:`qfluentwidgets.components.widgets.progress_bar.ProgressBar` Progress ring .. py:attribute:: lightBackgroundColor .. py:attribute:: darkBackgroundColor .. py:method:: getStrokeWidth() .. py:method:: setStrokeWidth(w: int) .. py:method:: paintEvent(e) .. py:attribute:: strokeWidth .. py:class:: IndeterminateProgressRing(parent=None, start=True) Bases: :py:obj:`PyQt5.QtWidgets.QProgressBar` Indeterminate progress ring .. py:attribute:: lightBackgroundColor .. py:attribute:: darkBackgroundColor .. py:attribute:: startAngleAni1 .. py:attribute:: startAngleAni2 .. py:attribute:: spanAngleAni1 .. py:attribute:: spanAngleAni2 .. py:attribute:: startAngleAniGroup .. py:attribute:: spanAngleAniGroup .. py:attribute:: aniGroup .. py:method:: startAngle() .. py:method:: spanAngle() .. py:method:: getStrokeWidth() .. py:method:: setStrokeWidth(w: int) .. py:method:: start() start spin .. py:method:: stop() stop spin .. py:method:: lightBarColor() .. py:method:: darkBarColor() .. py:method:: setCustomBarColor(light, dark) set the custom bar color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor bar color in light/dark theme mode .. py:method:: setCustomBackgroundColor(light, dark) set the custom background color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor background color in light/dark theme mode .. py:method:: paintEvent(e) .. py:attribute:: strokeWidth .. py:class:: ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Fluent scroll bar .. py:attribute:: rangeChanged .. py:attribute:: valueChanged .. py:attribute:: sliderPressed .. py:attribute:: sliderReleased .. py:attribute:: sliderMoved .. py:attribute:: groove .. py:attribute:: handle .. py:attribute:: timer .. py:method:: value() .. py:method:: val() .. py:method:: minimum() .. py:method:: maximum() .. py:method:: orientation() .. py:method:: pageStep() .. py:method:: singleStep() .. py:method:: isSliderDown() .. py:method:: setValue(value: int) .. py:method:: setMinimum(min: int) .. py:method:: setMaximum(max: int) .. py:method:: setRange(min: int, max: int) .. py:method:: setPageStep(step: int) .. py:method:: setSingleStep(step: int) .. py:method:: setSliderDown(isDown: bool) .. py:method:: expand() expand scroll bar .. py:method:: collapse() collapse scroll bar .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: resizeEvent(e) .. py:method:: mousePressEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: mouseReleaseEvent(e) .. py:method:: mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: setForceHidden(isHidden: bool) whether to force the scrollbar to be hidden .. py:method:: wheelEvent(e) .. py:class:: SmoothScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent) Bases: :py:obj:`ScrollBar` Smooth scroll bar .. py:attribute:: duration :value: 500 .. py:attribute:: ani .. py:method:: setValue(value, useAni=True) .. py:method:: scrollValue(value, useAni=True) scroll the specified distance .. py:method:: scrollTo(value, useAni=True) scroll to the specified position .. py:method:: resetValue(value) .. py:method:: mousePressEvent(e) .. py:method:: mouseMoveEvent(e) .. py:method:: setScrollAnimation(duration, easing=QEasingCurve.OutCubic) set scroll animation Parameters ---------- duration: int scroll duration easing: QEasingCurve animation type .. py:class:: SmoothScrollDelegate(parent: PyQt5.QtWidgets.QAbstractScrollArea, useAni=False) Bases: :py:obj:`PyQt5.QtCore.QObject` Smooth scroll delegate .. py:attribute:: useAni .. py:attribute:: vScrollBar .. py:attribute:: hScrollBar .. py:attribute:: verticalSmoothScroll .. py:attribute:: horizonSmoothScroll .. py:attribute:: setVerticalScrollBarPolicy .. py:attribute:: setHorizontalScrollBarPolicy .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:class:: TeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Teaching tip .. py:attribute:: target .. py:attribute:: duration .. py:attribute:: isDeleteOnClose .. py:attribute:: manager .. py:attribute:: hBoxLayout .. py:attribute:: opacityAni .. py:attribute:: bubble .. py:method:: setShadowEffect(blurRadius=35, offset=(0, 8)) add shadow to dialog .. py:method:: showEvent(e) .. py:method:: closeEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft) add widget to teaching tip .. py:property:: view .. py:method:: setView(view) .. py:method:: make(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) :classmethod: 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 .. py:method:: create(target: PyQt5.QtWidgets.QWidget, title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=True, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) :classmethod: 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 .. py:class:: TeachingTipTailPosition Bases: :py:obj:`enum.Enum` Teaching tip tail position .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: LEFT :value: 2 .. py:attribute:: RIGHT :value: 3 .. py:attribute:: TOP_LEFT :value: 4 .. py:attribute:: TOP_RIGHT :value: 5 .. py:attribute:: BOTTOM_LEFT :value: 6 .. py:attribute:: BOTTOM_RIGHT :value: 7 .. py:attribute:: LEFT_TOP :value: 8 .. py:attribute:: LEFT_BOTTOM :value: 9 .. py:attribute:: RIGHT_TOP :value: 10 .. py:attribute:: RIGHT_BOTTOM :value: 11 .. py:attribute:: NONE :value: 12 .. py:class:: TeachingTipView(title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=True, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.flyout.FlyoutView` Teaching tip view .. py:attribute:: manager .. py:attribute:: hBoxLayout .. py:method:: paintEvent(e) .. py:class:: PopupTeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) Bases: :py:obj:`TeachingTip` Pop up teaching tip .. py:class:: FlyoutView(title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=False, parent=None) Bases: :py:obj:`FlyoutViewBase` Flyout view .. py:attribute:: closed .. py:attribute:: icon .. py:attribute:: title .. py:attribute:: image .. py:attribute:: content .. py:attribute:: isClosable .. py:attribute:: vBoxLayout .. py:attribute:: viewLayout .. py:attribute:: widgetLayout .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: iconWidget .. py:attribute:: imageLabel .. py:attribute:: closeButton .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft) add widget to view .. py:method:: showEvent(e) .. py:class:: FlyoutViewBase(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Flyout view base class .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft) :abstractmethod: .. py:method:: backgroundColor() .. py:method:: borderColor() .. py:method:: paintEvent(e) .. py:class:: Flyout(view: FlyoutViewBase, parent=None, isDeleteOnClose=True) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Flyout .. py:attribute:: closed .. py:attribute:: view .. py:attribute:: hBoxLayout .. py:attribute:: aniManager :type: FlyoutAnimationManager :value: None .. py:attribute:: isDeleteOnClose .. py:method:: setShadowEffect(blurRadius=35, offset=(0, 8)) add shadow to dialog .. py:method:: closeEvent(e) .. py:method:: showEvent(e) .. py:method:: exec(pos: PyQt5.QtCore.QPoint, aniType=FlyoutAnimationType.PULL_UP) show calendar view .. py:method:: make(view: FlyoutViewBase, target: Union[PyQt5.QtWidgets.QWidget, PyQt5.QtCore.QPoint] = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True) :classmethod: 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 .. py:method:: create(title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=False, target: Union[PyQt5.QtWidgets.QWidget, PyQt5.QtCore.QPoint] = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True) :classmethod: 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 .. py:method:: fadeOut() .. py:class:: FlyoutAnimationType Bases: :py:obj:`enum.Enum` Flyout animation type .. py:attribute:: PULL_UP :value: 0 .. py:attribute:: DROP_DOWN :value: 1 .. py:attribute:: SLIDE_LEFT :value: 2 .. py:attribute:: SLIDE_RIGHT :value: 3 .. py:attribute:: FADE_IN :value: 4 .. py:attribute:: NONE :value: 5 .. py:class:: FlyoutAnimationManager(flyout: Flyout) Bases: :py:obj:`PyQt5.QtCore.QObject` Flyout animation manager .. py:attribute:: managers .. py:attribute:: flyout .. py:attribute:: aniGroup .. py:attribute:: slideAni .. py:attribute:: opacityAni .. py:method:: register(name) :classmethod: register menu animation manager Parameters ---------- name: Any the name of manager, it should be unique .. py:method:: exec(pos: PyQt5.QtCore.QPoint) :abstractmethod: start animation .. py:method:: position(target: PyQt5.QtWidgets.QWidget) :abstractmethod: return the top left position relative to the target .. py:method:: make(aniType: FlyoutAnimationType, flyout: Flyout) -> FlyoutAnimationManager :classmethod: mask animation manager .. py:class:: TabBar(parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.scroll_area.SingleDirectionScrollArea` Tab bar .. py:attribute:: currentChanged .. py:attribute:: tabBarClicked .. py:attribute:: tabCloseRequested .. py:attribute:: tabAddRequested .. py:attribute:: items :type: List[TabItem] :value: [] .. py:attribute:: itemMap :type: Dict[str, TabItem] .. py:attribute:: dragPos .. py:attribute:: isDraging :value: False .. py:attribute:: lightSelectedBackgroundColor .. py:attribute:: darkSelectedBackgroundColor .. py:attribute:: closeButtonDisplayMode .. py:attribute:: view .. py:attribute:: hBoxLayout .. py:attribute:: itemLayout .. py:attribute:: widgetLayout .. py:attribute:: addButton .. py:method:: setAddButtonVisible(isVisible: bool) .. py:method:: addTab(routeKey: str, text: str, icon: Union[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 .. py:method:: insertTab(index: int, routeKey: str, text: str, icon: Union[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 .. py:method:: removeTab(index: int) .. py:method:: removeTabByKey(routeKey: str) .. py:method:: setCurrentIndex(index: int) set current index .. py:method:: setCurrentTab(routeKey: str) .. py:method:: currentIndex() .. py:method:: currentTab() .. py:method:: setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode) set close button display mode .. py:method:: tabItem(index: int) .. py:method:: tab(routeKey: str) .. py:method:: tabRegion() -> PyQt5.QtCore.QRect return the bounding rect of all tabs .. py:method:: tabRect(index: int) return the visual rectangle of the tab at position index .. py:method:: tabText(index: int) .. py:method:: tabIcon(index: int) .. py:method:: tabToolTip(index: int) .. py:method:: setTabsClosable(isClosable: bool) set whether the tab is closable .. py:method:: tabsClosable() .. py:method:: setTabIcon(index: int, icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase, str]) set tab icon .. py:method:: setTabText(index: int, text: str) set tab text .. py:method:: setTabVisible(index: int, isVisible: bool) set the visibility of tab .. py:method:: setTabTextColor(index: int, color: PyQt5.QtGui.QColor) set the text color of tab item .. py:method:: setTabToolTip(index: int, toolTip: str) set tool tip of tab .. py:method:: setTabSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor) set the background in selected state .. py:method:: setTabShadowEnabled(isEnabled: bool) set whether the shadow of tab is enabled .. py:method:: isTabShadowEnabled() .. py:method:: paintEvent(e) .. py:method:: setMovable(movable: bool) .. py:method:: isMovable() .. py:method:: setScrollable(scrollable: bool) .. py:method:: setTabMaximumWidth(width: int) set the maximum width of tab .. py:method:: setTabMinimumWidth(width: int) set the minimum width of tab .. py:method:: tabMaximumWidth() .. py:method:: tabMinimumWidth() .. py:method:: isScrollable() .. py:method:: count() returns the number of tabs .. py:method:: mousePressEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: mouseReleaseEvent(e) .. py:attribute:: movable .. py:attribute:: scrollable .. py:attribute:: tabMaxWidth .. py:attribute:: tabMinWidth .. py:attribute:: tabShadowEnabled .. py:class:: TabItem(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.PushButton` Tab item .. py:attribute:: closed .. py:method:: slideTo(x: int, duration=250) .. py:method:: setShadowEnabled(isEnabled: bool) set whether the shadow is enabled .. py:method:: setRouteKey(key: str) .. py:method:: routeKey() .. py:method:: setBorderRadius(radius: int) .. py:method:: setSelected(isSelected: bool) .. py:method:: setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode) set close button display mode .. py:method:: setTextColor(color: PyQt5.QtGui.QColor) .. py:method:: setSelectedBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor) set background color in selected state .. py:method:: resizeEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:method:: mouseMoveEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: sizeHint() .. py:method:: paintEvent(e) .. py:class:: TabCloseButtonDisplayMode Bases: :py:obj:`enum.Enum` Tab close button display mode .. py:attribute:: ALWAYS :value: 0 .. py:attribute:: ON_HOVER :value: 1 .. py:attribute:: NEVER :value: 2 .. py:class:: PipsPager(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QListWidget` Pips pager Constructors ------------ * PipsPager(`parent`: QWidget = None) * PipsPager(`orient`: Qt.Orientation, `parent`: QWidget = None) .. py:attribute:: currentIndexChanged .. py:attribute:: orientation .. py:method:: setPageNumber(n: int) set the number of page .. py:method:: getPageNumber() get the number of page .. py:method:: getVisibleNumber() get the number of visible pips .. py:method:: setVisibleNumber(n: int) .. py:method:: scrollNext() scroll down an item .. py:method:: scrollPrevious() scroll up an item .. py:method:: scrollToItem(item: PyQt5.QtWidgets.QListWidgetItem, hint=QListWidget.PositionAtCenter) scroll to item .. py:method:: adjustSize() -> None .. py:method:: isHorizontal() .. py:method:: setCurrentIndex(index: int) set current index .. py:method:: isPreviousButtonVisible() .. py:method:: isNextButtonVisible() .. py:method:: currentIndex() .. py:method:: setPreviousButtonDisplayMode(mode: PipsScrollButtonDisplayMode) set the display mode of previous button .. py:method:: setNextButtonDisplayMode(mode: PipsScrollButtonDisplayMode) set the display mode of next button .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: wheelEvent(e) .. py:method:: resizeEvent(e) .. py:attribute:: visibleNumber .. py:attribute:: pageNumber .. py:class:: VerticalPipsPager(parent=None) Bases: :py:obj:`PipsPager` Vertical pips pager .. py:class:: HorizontalPipsPager(parent=None) Bases: :py:obj:`PipsPager` Horizontal pips pager .. py:class:: PipsScrollButtonDisplayMode Bases: :py:obj:`enum.Enum` Pips pager scroll button display mode .. py:attribute:: ALWAYS :value: 0 .. py:attribute:: ON_HOVER :value: 1 .. py:attribute:: NEVER :value: 2 .. py:class:: HorizontalSeparator(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Horizontal separator .. py:method:: paintEvent(e) .. py:class:: VerticalSeparator(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Vertical separator .. py:method:: paintEvent(e) .. py:class:: NavigationWidget(isSelectable: bool, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Navigation widget .. py:attribute:: clicked .. py:attribute:: selectedChanged .. py:attribute:: EXPAND_WIDTH :value: 312 .. py:attribute:: isCompacted :value: True .. py:attribute:: isSelected :value: False .. py:attribute:: isPressed :value: False .. py:attribute:: isEnter :value: False .. py:attribute:: isSelectable .. py:attribute:: treeParent :value: None .. py:attribute:: nodeDepth :value: 0 .. py:attribute:: lightTextColor .. py:attribute:: darkTextColor .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: click() .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:method:: setSelected(isSelected: bool) set whether the button is selected Parameters ---------- isSelected: bool whether the button is selected .. py:method:: textColor() .. py:method:: setLightTextColor(color) set the text color in light theme mode .. py:method:: setDarkTextColor(color) set the text color in dark theme mode .. py:method:: setTextColor(light, dark) set the text color in light/dark theme mode .. py:class:: NavigationPushButton(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], text: str, isSelectable: bool, parent=None) Bases: :py:obj:`NavigationWidget` Navigation push button .. py:method:: text() .. py:method:: setText(text: str) .. py:method:: icon() .. py:method:: setIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon]) .. py:method:: paintEvent(e) .. py:class:: NavigationSeparator(parent=None) Bases: :py:obj:`NavigationWidget` Navigation Separator .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:method:: paintEvent(e) .. py:class:: NavigationToolButton(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], parent=None) Bases: :py:obj:`NavigationPushButton` Navigation tool button .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:class:: NavigationTreeWidget(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], text: str, isSelectable: bool, parent=None) Bases: :py:obj:`NavigationTreeWidgetBase` Navigation tree widget .. py:attribute:: expanded .. py:attribute:: treeChildren :type: List[NavigationTreeWidget] :value: [] .. py:attribute:: isExpanded :value: False .. py:attribute:: itemWidget .. py:attribute:: vBoxLayout .. py:attribute:: expandAni .. py:method:: addChild(child) add child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: text() .. py:method:: icon() .. py:method:: setText(text) .. py:method:: setIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon]) .. py:method:: textColor() .. py:method:: setLightTextColor(color) set the text color in light theme mode .. py:method:: setDarkTextColor(color) set the text color in dark theme mode .. py:method:: setTextColor(light, dark) set the text color in light/dark theme mode .. py:method:: setFont(font: PyQt5.QtGui.QFont) .. py:method:: clone() .. py:method:: suitableWidth() .. py:method:: insertChild(index, child) insert child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: removeChild(child) remove child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: childItems() -> list return child items .. py:method:: setExpanded(isExpanded: bool, ani=False) set the expanded status .. py:method:: isRoot() is root node .. py:method:: isLeaf() is leaf node .. py:method:: setSelected(isSelected: bool) set whether the button is selected Parameters ---------- isSelected: bool whether the button is selected .. py:method:: mouseReleaseEvent(e) .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:class:: NavigationTreeWidgetBase(isSelectable: bool, parent=None) Bases: :py:obj:`NavigationWidget` Navigation tree widget base class .. py:method:: addChild(child) :abstractmethod: add child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: insertChild(index: int, child: NavigationWidget) :abstractmethod: insert child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: removeChild(child: NavigationWidget) :abstractmethod: remove child Parameters ---------- child: NavigationTreeWidgetBase child item .. py:method:: isRoot() is root node .. py:method:: isLeaf() is leaf node .. py:method:: setExpanded(isExpanded: bool) :abstractmethod: set the expanded status Parameters ---------- isExpanded: bool whether to expand node .. py:method:: childItems() -> list :abstractmethod: return child items .. py:class:: NavigationAvatarWidget(name: str, avatar: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage], parent=None) Bases: :py:obj:`NavigationWidget` Avatar widget .. py:attribute:: name .. py:method:: setName(name: str) .. py:method:: setAvatar(avatar: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage]) .. py:method:: paintEvent(e) .. py:class:: NavigationPanel(parent=None, isMinimalEnabled=False) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Navigation panel .. py:attribute:: displayModeChanged .. py:attribute:: acrylicBrush .. py:attribute:: scrollArea .. py:attribute:: scrollWidget .. py:attribute:: menuButton .. py:attribute:: returnButton .. py:attribute:: vBoxLayout .. py:attribute:: topLayout .. py:attribute:: bottomLayout .. py:attribute:: scrollLayout .. py:attribute:: items :type: Dict[str, NavigationItem] .. py:attribute:: history .. py:attribute:: expandAni .. py:attribute:: expandWidth :value: 322 .. py:attribute:: minimumExpandWidth :value: 1008 .. py:attribute:: isMinimalEnabled .. py:method:: widget(routeKey: str) .. py:method:: addItem(routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) add navigation item Parameters ---------- routeKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added selectable: bool whether the item is selectable tooltip: str the tooltip of item parentRouteKey: str the route key of parent item, the parent widget should be `NavigationTreeWidget` .. py:method:: addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) add custom widget Parameters ---------- routeKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added tooltip: str the tooltip of widget parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidget` .. py:method:: insertItem(index: int, routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey=None) insert navigation tree item Parameters ---------- index: int the insert position of parent widget routeKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added selectable: bool whether the item is selectable tooltip: str the tooltip of item parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidget` .. py:method:: insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) insert custom widget Parameters ---------- index: int insert position routeKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added tooltip: str the tooltip of widget parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidget` .. py:method:: addSeparator(position=NavigationItemPosition.TOP) add separator Parameters ---------- position: NavigationPostion where to add the separator .. py:method:: insertSeparator(index: int, position=NavigationItemPosition.TOP) add separator Parameters ---------- index: int insert position position: NavigationPostion where to add the separator .. py:method:: removeWidget(routeKey: str) remove widget Parameters ---------- routeKey: str the unique name of item .. py:method:: setMenuButtonVisible(isVisible: bool) set whether the menu button is visible .. py:method:: setReturnButtonVisible(isVisible: bool) set whether the return button is visible .. py:method:: setCollapsible(on: bool) .. py:method:: setExpandWidth(width: int) set the maximum width .. py:method:: setMinimumExpandWidth(width: int) Set the minimum window width that allows panel to be expanded .. py:method:: setAcrylicEnabled(isEnabled: bool) .. py:method:: isAcrylicEnabled() whether the acrylic effect is enabled .. py:method:: expand(useAni=True) expand navigation panel .. py:method:: collapse() collapse navigation panel .. py:method:: toggle() toggle navigation panel .. py:method:: setCurrentItem(routeKey: str) set current selected item Parameters ---------- routeKey: str the unique name of item .. py:method:: isCollapsed() .. py:method:: resizeEvent(e: PyQt5.QtGui.QResizeEvent) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: layoutMinHeight() .. py:method:: paintEvent(e) .. py:class:: NavigationItemPosition Bases: :py:obj:`enum.Enum` Navigation item position .. py:attribute:: TOP :value: 0 .. py:attribute:: SCROLL :value: 1 .. py:attribute:: BOTTOM :value: 2 .. py:class:: NavigationDisplayMode Bases: :py:obj:`enum.Enum` Navigation display mode .. py:attribute:: MINIMAL :value: 0 .. py:attribute:: COMPACT :value: 1 .. py:attribute:: EXPAND :value: 2 .. py:attribute:: MENU :value: 3 .. py:class:: NavigationInterface(parent=None, showMenuButton=True, showReturnButton=False, collapsible=True) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Navigation interface .. py:attribute:: displayModeChanged .. py:attribute:: panel .. py:method:: addItem(routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) -> qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget add navigation item Parameters ---------- routKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal selectable: bool whether the item is selectable position: NavigationItemPosition where the button is added tooltip: str the tooltip of item parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidgetBase` .. py:method:: addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) add custom widget Parameters ---------- routKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the widget is added tooltip: str the tooltip of widget parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidgetBase` .. py:method:: insertItem(index: int, routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) -> qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget insert navigation item Parameters ---------- index: int insert position routKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal selectable: bool whether the item is selectable position: NavigationItemPosition where the item is added tooltip: str the tooltip of item parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidgetBase` .. py:method:: insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) insert custom widget Parameters ---------- index: int insert position routKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the widget is added tooltip: str the tooltip of widget parentRouteKey: str the route key of parent item, the parent item should be `NavigationTreeWidgetBase` .. py:method:: addSeparator(position=NavigationItemPosition.TOP) add separator Parameters ---------- position: NavigationPostion where to add the separator .. py:method:: insertSeparator(index: int, position=NavigationItemPosition.TOP) add separator Parameters ---------- index: int insert position position: NavigationPostion where to add the separator .. py:method:: removeWidget(routeKey: str) remove widget Parameters ---------- routKey: str the unique name of item .. py:method:: setCurrentItem(name: str) set current selected item Parameters ---------- name: str the unique name of item .. py:method:: expand(useAni=True) expand navigation panel .. py:method:: toggle() toggle navigation panel .. py:method:: setExpandWidth(width: int) set the maximum width .. py:method:: setMinimumExpandWidth(width: int) Set the minimum window width that allows panel to be expanded .. py:method:: setMenuButtonVisible(isVisible: bool) set whether the menu button is visible .. py:method:: setReturnButtonVisible(isVisible: bool) set whether the return button is visible .. py:method:: setCollapsible(collapsible: bool) .. py:method:: isAcrylicEnabled() .. py:method:: setAcrylicEnabled(isEnabled: bool) set whether the acrylic background effect is enabled .. py:method:: widget(routeKey: str) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: resizeEvent(e: PyQt5.QtGui.QResizeEvent) .. py:class:: NavigationBarPushButton(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], text: str, isSelectable: bool, selectedIcon=None, parent=None) Bases: :py:obj:`qfluentwidgets.components.navigation.navigation_widget.NavigationPushButton` Navigation bar push button .. py:attribute:: iconAni .. py:method:: selectedIcon() .. py:method:: setSelectedIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon]) .. py:method:: setSelectedTextVisible(isVisible) .. py:method:: paintEvent(e) .. py:method:: setSelected(isSelected: bool) set whether the button is selected Parameters ---------- isSelected: bool whether the button is selected .. py:class:: NavigationBar(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` .. py:attribute:: scrollArea .. py:attribute:: scrollWidget .. py:attribute:: vBoxLayout .. py:attribute:: topLayout .. py:attribute:: bottomLayout .. py:attribute:: scrollLayout .. py:attribute:: items :type: Dict[str, qfluentwidgets.components.navigation.navigation_widget.NavigationWidget] .. py:attribute:: history .. py:method:: widget(routeKey: str) .. py:method:: addItem(routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP) add navigation item Parameters ---------- routeKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal selectable: bool whether the item is selectable selectedIcon: str | QIcon | FluentIconBase the icon of navigation item in selected state position: NavigationItemPosition where the button is added .. py:method:: addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP) add custom widget Parameters ---------- routeKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added .. py:method:: insertItem(index: int, routeKey: str, icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP) insert navigation tree item Parameters ---------- index: int the insert position of parent widget routeKey: str the unique name of item icon: str | QIcon | FluentIconBase the icon of navigation item text: str the text of navigation item onClick: callable the slot connected to item clicked signal selectable: bool whether the item is selectable selectedIcon: str | QIcon | FluentIconBase the icon of navigation item in selected state position: NavigationItemPosition where the button is added .. py:method:: insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP) insert custom widget Parameters ---------- index: int insert position routeKey: str the unique name of item widget: NavigationWidget the custom widget to be added onClick: callable the slot connected to item clicked signal position: NavigationItemPosition where the button is added .. py:method:: removeWidget(routeKey: str) remove widget Parameters ---------- routeKey: str the unique name of item .. py:method:: setCurrentItem(routeKey: str) set current selected item Parameters ---------- routeKey: str the unique name of item .. py:method:: setFont(font: PyQt5.QtGui.QFont) set the font of navigation item .. py:method:: setSelectedTextVisible(isVisible: bool) set whether the text is visible when button is selected .. py:method:: buttons() .. py:class:: Pivot(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Pivot .. py:attribute:: currentItemChanged .. py:attribute:: items :type: Dict[str, PivotItem] .. py:attribute:: hBoxLayout .. py:attribute:: slideAni .. py:method:: 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 .. py:method:: 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 .. py:method:: 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 .. py:method:: 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 .. py:method:: removeWidget(routeKey: str) remove widget Parameters ---------- routeKey: str the unique name of item .. py:method:: clear() clear all navigation items .. py:method:: currentItem() Returns the current selected item .. py:method:: currentRouteKey() .. py:method:: setCurrentItem(routeKey: str) set current selected item Parameters ---------- routeKey: str the unique name of item .. py:method:: showEvent(e) .. py:method:: setItemFontSize(size: int) set the pixel font size of items .. py:method:: setItemText(routeKey: str, text: str) set the text of item .. py:method:: widget(routeKey: str) .. py:method:: resizeEvent(e) -> None .. py:method:: paintEvent(e) .. py:class:: PivotItem(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.PushButton` Pivot item .. py:attribute:: itemClicked .. py:method:: setSelected(isSelected: bool) .. py:class:: SegmentedItem(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.navigation.pivot.PivotItem` Segmented item .. py:class:: SegmentedWidget(parent=None) Bases: :py:obj:`qfluentwidgets.components.navigation.pivot.Pivot` Segmented widget .. py:method:: 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 .. py:method:: paintEvent(e) .. py:class:: SegmentedToolItem(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.ToolButton` Pivot item .. py:attribute:: itemClicked .. py:method:: setSelected(isSelected: bool) .. py:class:: SegmentedToolWidget(parent=None) Bases: :py:obj:`SegmentedWidget` Segmented tool widget .. py:method:: addItem(routeKey: str, icon: Union[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 .. py:method:: insertItem(index: int, routeKey: str, icon: Union[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 .. py:class:: SegmentedToggleToolItem(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.TransparentToolButton` Transparent background tool button Constructors ------------ * TransparentToolButton(`parent`: QWidget = None) * TransparentToolButton(`icon`: QIcon | str | FluentIconBase, `parent`: QWidget = None) .. py:attribute:: itemClicked .. py:method:: setSelected(isSelected: bool) .. py:class:: SegmentedToggleToolWidget(parent=None) Bases: :py:obj:`SegmentedToolWidget` Segmented toggle tool widget .. py:method:: paintEvent(e) .. py:class:: BreadcrumbBar(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Breadcrumb bar .. py:attribute:: currentItemChanged .. py:attribute:: currentIndexChanged .. py:attribute:: itemMap :type: Dict[BreadcrumbItem] .. py:attribute:: items :type: List[BreadcrumbItem] :value: [] .. py:attribute:: hiddenItems :type: List[BreadcrumbItem] :value: [] .. py:attribute:: elideButton .. py:method:: addItem(routeKey: str, text: str) add item Parameters ---------- routeKey: str unique key of item text: str the text of item .. py:method:: setCurrentIndex(index: int) .. py:method:: setCurrentItem(routeKey: str) .. py:method:: setItemText(routeKey: str, text: str) .. py:method:: item(routeKey: str) -> BreadcrumbItem .. py:method:: itemAt(index: int) .. py:method:: currentIndex() .. py:method:: currentItem() -> BreadcrumbItem .. py:method:: resizeEvent(e) .. py:method:: clear() clear all items .. py:method:: popItem() pop trailing item .. py:method:: count() Returns the number of items .. py:method:: updateGeometry() .. py:method:: isElideVisible() .. py:method:: setFont(font: PyQt5.QtGui.QFont) .. py:method:: getSpacing() .. py:method:: setSpacing(spacing: int) .. py:attribute:: spacing .. py:class:: BreadcrumbItem(routeKey: str, text: str, index: int, parent=None) Bases: :py:obj:`BreadcrumbWidget` Breadcrumb item .. py:attribute:: text .. py:attribute:: routeKey .. py:attribute:: isHover :value: False .. py:attribute:: isPressed :value: False .. py:attribute:: isSelected :value: False .. py:attribute:: index .. py:attribute:: spacing :value: 5 .. py:method:: setText(text: str) .. py:method:: isRoot() .. py:method:: setSelected(isSelected: bool) .. py:method:: setFont(font: PyQt5.QtGui.QFont) .. py:method:: setSpacing(spacing: int) .. py:method:: paintEvent(e) .. py:class:: CalendarPicker(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Calendar picker .. py:attribute:: dateChanged .. py:method:: getDate() .. py:method:: setDate(date: PyQt5.QtCore.QDate) set the selected date .. py:method:: reset() reset date .. py:method:: getDateFormat() .. py:method:: setDateFormat(format: Union[PyQt5.QtCore.Qt.DateFormat, str]) .. py:method:: paintEvent(e) .. py:attribute:: date .. py:attribute:: dateFormat .. py:class:: FastCalendarPicker(parent=None) Bases: :py:obj:`CalendarPicker` Pro calendar picker .. py:attribute:: flyoutAnimationType .. py:method:: setFlyoutAnimationType(aniType: qfluentwidgets.components.widgets.flyout.FlyoutAnimationType) .. py:class:: DatePickerBase(parent=None) Bases: :py:obj:`qfluentwidgets.components.date_time.picker_base.PickerBase` Date picker base class .. py:attribute:: dateChanged .. py:attribute:: calendar .. py:method:: getDate() .. py:method:: setDate(date: PyQt5.QtCore.QDate) :abstractmethod: set current date .. py:method:: setYearFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter) .. py:method:: setMonthFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter) .. py:method:: setDayFormatter(formatter: qfluentwidgets.components.date_time.picker_base.PickerColumnFormatter) .. py:method:: yearFormatter() .. py:method:: dayFormatter() .. py:method:: monthFormatter() .. py:class:: DatePicker(parent=None, format=MM_DD_YYYY, isMonthTight=True) Bases: :py:obj:`DatePickerBase` Date picker .. py:attribute:: MM_DD_YYYY :value: 0 .. py:attribute:: YYYY_MM_DD :value: 1 .. py:attribute:: MONTH .. py:attribute:: YEAR .. py:attribute:: DAY .. py:attribute:: isMonthTight .. py:method:: 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` .. py:method:: panelInitialValue() initial value of panel .. py:method:: setMonthTight(isTight: bool) set whether the month column is tight .. py:method:: getDate() .. py:method:: setDate(date: PyQt5.QtCore.QDate) set current date .. py:attribute:: date .. py:class:: ZhDatePicker(parent=None) Bases: :py:obj:`DatePicker` Chinese date picker .. py:attribute:: MONTH :value: '月' .. py:attribute:: YEAR :value: '年' .. py:attribute:: DAY :value: '日' .. py:class:: PickerBase(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton` Picker base class .. py:attribute:: columns :type: List[PickerColumnButton] :value: [] .. py:attribute:: hBoxLayout .. py:method:: 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 .. py:method:: setColumnAlignment(index: int, align=Qt.AlignCenter) set the text alignment of specified column .. py:method:: setColumnWidth(index: int, width: int) set the width of specified column .. py:method:: setColumnTight(index: int) make the specified column to be tight .. py:method:: setColumnVisible(index: int, isVisible: bool) set the text alignment of specified column .. py:method:: value() .. py:method:: initialValue() .. py:method:: setColumnValue(index: int, value) .. py:method:: setColumnInitialValue(index: int, value) .. py:method:: setColumnFormatter(index: int, formatter: PickerColumnFormatter) .. py:method:: setColumnItems(index: int, items: Iterable) .. py:method:: encodeValue(index: int, value) convert original value to formatted value .. py:method:: decodeValue(index: int, value) convert formatted value to origin value .. py:method:: 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 .. py:method:: clearColumns() clear columns .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: panelInitialValue() initial value of panel .. py:class:: PickerPanel(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` picker panel .. py:attribute:: confirmed .. py:attribute:: columnValueChanged .. py:attribute:: itemHeight :value: 37 .. py:attribute:: listWidgets :type: List[qfluentwidgets.components.widgets.cycle_list_widget.CycleListWidget] :value: [] .. py:attribute:: view .. py:attribute:: itemMaskWidget .. py:attribute:: hSeparatorWidget .. py:attribute:: yesButton .. py:attribute:: cancelButton .. py:attribute:: hBoxLayout .. py:attribute:: listLayout .. py:attribute:: buttonLayout .. py:attribute:: vBoxLayout .. py:method:: setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30)) add shadow to dialog .. py:method:: 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 .. py:method:: resizeEvent(e) .. py:method:: value() return the value of columns .. py:method:: setValue(value: list) set the value of columns .. py:method:: columnValue(index: int) -> str return the value of specified column .. py:method:: setColumnValue(index: int, value: str) set the value of specified column .. py:method:: column(index: int) return the list widget of specified column .. py:method:: exec(pos, ani=True) show panel Parameters ---------- pos: QPoint pop-up position ani: bool Whether to show pop-up animation .. py:class:: PickerColumnFormatter Bases: :py:obj:`PyQt5.QtCore.QObject` Picker column formatter .. py:method:: encode(value) convert original value to formatted value .. py:method:: decode(value: str) convert formatted value to original value .. py:class:: TimePicker(parent=None, showSeconds=False) Bases: :py:obj:`TimePickerBase` 24 hours time picker .. py:attribute:: w .. py:method:: setTime(time) set current time Parameters ---------- time: QTime current time .. py:method:: setSecondVisible(isVisible: bool) set the visibility of seconds column .. py:method:: panelInitialValue() initial value of panel .. py:method:: getTime() .. py:method:: isSecondVisible() .. py:attribute:: time .. py:attribute:: secondVisible .. py:class:: AMTimePicker(parent=None, showSeconds=False) Bases: :py:obj:`TimePickerBase` AM/PM time picker .. py:attribute:: AM .. py:attribute:: PM .. py:method:: setSecondVisible(isVisible: bool) set the visibility of seconds column .. py:method:: setTime(time) set current time Parameters ---------- time: QTime current time .. py:method:: panelInitialValue() initial value of panel .. py:method:: getTime() .. py:method:: isSecondVisible() .. py:attribute:: time .. py:attribute:: secondVisible .. py:function:: setFont(widget: PyQt5.QtWidgets.QWidget, fontSize=14, weight=QFont.Normal) set the font of widget Parameters ---------- widget: QWidget the widget to set font fontSize: int font pixel size weight: `QFont.Weight` font weight .. py:function:: getFont(fontSize=14, weight=QFont.Normal) create font Parameters ---------- fontSize: int font pixel size weight: `QFont.Weight` font weight .. py:class:: TextWrap Text wrap .. py:attribute:: EAST_ASAIN_WIDTH_TABLE .. py:method:: get_width(char: str) -> int :classmethod: Returns the width of the char .. py:method:: get_text_width(text: str) -> int :classmethod: Returns the width of the text .. py:method:: get_char_type(char: str) -> CharType :classmethod: Returns the type of the char .. py:method:: process_text_whitespace(text: str) -> str :classmethod: Process whitespace and leading and trailing spaces in strings .. py:method:: split_long_token(token: str, width: int) -> List[str] :classmethod: Split long token into smaller chunks. .. py:method:: tokenizer(text: str) :classmethod: tokenize line .. py:method:: wrap(text: str, width: int, once: bool = True) -> Tuple[str, bool] :classmethod: Wrap according to string length Parameters ---------- text: str the text to be wrapped width: int the maximum length of a single line, the length of Chinese characters is 2 once: bool whether to wrap only once Returns ------- wrap_text: str text after auto word wrap process is_wrapped: bool whether a line break occurs in the text .. py:class:: Action(parent: PyQt5.QtCore.QObject = None, **kwargs) Bases: :py:obj:`PyQt5.QtWidgets.QAction` Fluent action Constructors ------------ * Action(`parent`: QWidget = None, `**kwargs`) * Action(`text`: str, `parent`: QWidget = None, `**kwargs`) * Action(`icon`: QIcon | FluentIconBase, `parent`: QWidget = None, `**kwargs`) .. py:attribute:: fluentIcon :value: None .. py:method:: icon() -> PyQt5.QtGui.QIcon .. py:method:: setIcon(icon: Union[FluentIconBase, PyQt5.QtGui.QIcon]) .. py:class:: Icon(fluentIcon: FluentIcon) Bases: :py:obj:`PyQt5.QtGui.QIcon` .. py:attribute:: fluentIcon .. py:function:: getIconColor(theme=Theme.AUTO, reverse=False) get the color of icon based on theme .. py:function:: drawSvgIcon(icon, painter, rect) draw svg icon Parameters ---------- icon: str | bytes | QByteArray the path or code of svg icon painter: QPainter painter rect: QRect | QRectF the rect to render icon .. py:class:: FluentIcon Bases: :py:obj:`FluentIconBase`, :py:obj:`enum.Enum` Fluent icon .. py:attribute:: UP :value: 'Up' .. py:attribute:: ADD :value: 'Add' .. py:attribute:: BUS :value: 'Bus' .. py:attribute:: CAR :value: 'Car' .. py:attribute:: CUT :value: 'Cut' .. py:attribute:: IOT :value: 'IOT' .. py:attribute:: PIN :value: 'Pin' .. py:attribute:: TAG :value: 'Tag' .. py:attribute:: VPN :value: 'VPN' .. py:attribute:: CAFE :value: 'Cafe' .. py:attribute:: CHAT :value: 'Chat' .. py:attribute:: COPY :value: 'Copy' .. py:attribute:: CODE :value: 'Code' .. py:attribute:: DOWN :value: 'Down' .. py:attribute:: EDIT :value: 'Edit' .. py:attribute:: FLAG :value: 'Flag' .. py:attribute:: FONT :value: 'Font' .. py:attribute:: GAME :value: 'Game' .. py:attribute:: HELP :value: 'Help' .. py:attribute:: HIDE :value: 'Hide' .. py:attribute:: HOME :value: 'Home' .. py:attribute:: INFO :value: 'Info' .. py:attribute:: LEAF :value: 'Leaf' .. py:attribute:: LINK :value: 'Link' .. py:attribute:: MAIL :value: 'Mail' .. py:attribute:: MENU :value: 'Menu' .. py:attribute:: MUTE :value: 'Mute' .. py:attribute:: MORE :value: 'More' .. py:attribute:: MOVE :value: 'Move' .. py:attribute:: PLAY :value: 'Play' .. py:attribute:: SAVE :value: 'Save' .. py:attribute:: SEND :value: 'Send' .. py:attribute:: SYNC :value: 'Sync' .. py:attribute:: UNIT :value: 'Unit' .. py:attribute:: VIEW :value: 'View' .. py:attribute:: WIFI :value: 'Wifi' .. py:attribute:: ZOOM :value: 'Zoom' .. py:attribute:: ALBUM :value: 'Album' .. py:attribute:: BRUSH :value: 'Brush' .. py:attribute:: BROOM :value: 'Broom' .. py:attribute:: CLOSE :value: 'Close' .. py:attribute:: CLOUD :value: 'Cloud' .. py:attribute:: EMBED :value: 'Embed' .. py:attribute:: GLOBE :value: 'Globe' .. py:attribute:: HEART :value: 'Heart' .. py:attribute:: LABEL :value: 'Label' .. py:attribute:: MEDIA :value: 'Media' .. py:attribute:: MOVIE :value: 'Movie' .. py:attribute:: MUSIC :value: 'Music' .. py:attribute:: ROBOT :value: 'Robot' .. py:attribute:: PAUSE :value: 'Pause' .. py:attribute:: PASTE :value: 'Paste' .. py:attribute:: PHOTO :value: 'Photo' .. py:attribute:: PHONE :value: 'Phone' .. py:attribute:: PRINT :value: 'Print' .. py:attribute:: SHARE :value: 'Share' .. py:attribute:: TILES :value: 'Tiles' .. py:attribute:: UNPIN :value: 'Unpin' .. py:attribute:: VIDEO :value: 'Video' .. py:attribute:: TRAIN :value: 'Train' .. py:attribute:: ADD_TO :value: 'AddTo' .. py:attribute:: ACCEPT :value: 'Accept' .. py:attribute:: CAMERA :value: 'Camera' .. py:attribute:: CANCEL :value: 'Cancel' .. py:attribute:: DELETE :value: 'Delete' .. py:attribute:: FOLDER :value: 'Folder' .. py:attribute:: FILTER :value: 'Filter' .. py:attribute:: MARKET :value: 'Market' .. py:attribute:: SCROLL :value: 'Scroll' .. py:attribute:: LAYOUT :value: 'Layout' .. py:attribute:: GITHUB :value: 'GitHub' .. py:attribute:: UPDATE :value: 'Update' .. py:attribute:: REMOVE :value: 'Remove' .. py:attribute:: RETURN :value: 'Return' .. py:attribute:: PEOPLE :value: 'People' .. py:attribute:: QRCODE :value: 'QRCode' .. py:attribute:: RINGER :value: 'Ringer' .. py:attribute:: ROTATE :value: 'Rotate' .. py:attribute:: SEARCH :value: 'Search' .. py:attribute:: VOLUME :value: 'Volume' .. py:attribute:: FRIGID :value: 'Frigid' .. py:attribute:: SAVE_AS :value: 'SaveAs' .. py:attribute:: ZOOM_IN :value: 'ZoomIn' .. py:attribute:: CONNECT :value: 'Connect' .. py:attribute:: HISTORY :value: 'History' .. py:attribute:: SETTING :value: 'Setting' .. py:attribute:: PALETTE :value: 'Palette' .. py:attribute:: MESSAGE :value: 'Message' .. py:attribute:: FIT_PAGE :value: 'FitPage' .. py:attribute:: ZOOM_OUT :value: 'ZoomOut' .. py:attribute:: AIRPLANE :value: 'Airplane' .. py:attribute:: ASTERISK :value: 'Asterisk' .. py:attribute:: CALORIES :value: 'Calories' .. py:attribute:: CALENDAR :value: 'Calendar' .. py:attribute:: FEEDBACK :value: 'Feedback' .. py:attribute:: LIBRARY :value: 'BookShelf' .. py:attribute:: MINIMIZE :value: 'Minimize' .. py:attribute:: CHECKBOX :value: 'CheckBox' .. py:attribute:: DOCUMENT :value: 'Document' .. py:attribute:: LANGUAGE :value: 'Language' .. py:attribute:: DOWNLOAD :value: 'Download' .. py:attribute:: QUESTION :value: 'Question' .. py:attribute:: SPEAKERS :value: 'Speakers' .. py:attribute:: DATE_TIME :value: 'DateTime' .. py:attribute:: FONT_SIZE :value: 'FontSize' .. py:attribute:: HOME_FILL :value: 'HomeFill' .. py:attribute:: PAGE_LEFT :value: 'PageLeft' .. py:attribute:: SAVE_COPY :value: 'SaveCopy' .. py:attribute:: SEND_FILL :value: 'SendFill' .. py:attribute:: SKIP_BACK :value: 'SkipBack' .. py:attribute:: SPEED_OFF :value: 'SpeedOff' .. py:attribute:: ALIGNMENT :value: 'Alignment' .. py:attribute:: BLUETOOTH :value: 'Bluetooth' .. py:attribute:: COMPLETED :value: 'Completed' .. py:attribute:: CONSTRACT :value: 'Constract' .. py:attribute:: HEADPHONE :value: 'Headphone' .. py:attribute:: MEGAPHONE :value: 'Megaphone' .. py:attribute:: PROJECTOR :value: 'Projector' .. py:attribute:: EDUCATION :value: 'Education' .. py:attribute:: LEFT_ARROW :value: 'LeftArrow' .. py:attribute:: ERASE_TOOL :value: 'EraseTool' .. py:attribute:: PAGE_RIGHT :value: 'PageRight' .. py:attribute:: PLAY_SOLID :value: 'PlaySolid' .. py:attribute:: BOOK_SHELF :value: 'BookShelf' .. py:attribute:: HIGHTLIGHT :value: 'Highlight' .. py:attribute:: FOLDER_ADD :value: 'FolderAdd' .. py:attribute:: PAUSE_BOLD :value: 'PauseBold' .. py:attribute:: PENCIL_INK :value: 'PencilInk' .. py:attribute:: PIE_SINGLE :value: 'PieSingle' .. py:attribute:: QUICK_NOTE :value: 'QuickNote' .. py:attribute:: SPEED_HIGH :value: 'SpeedHigh' .. py:attribute:: STOP_WATCH :value: 'StopWatch' .. py:attribute:: ZIP_FOLDER :value: 'ZipFolder' .. py:attribute:: BASKETBALL :value: 'Basketball' .. py:attribute:: BRIGHTNESS :value: 'Brightness' .. py:attribute:: DICTIONARY :value: 'Dictionary' .. py:attribute:: MICROPHONE :value: 'Microphone' .. py:attribute:: ARROW_DOWN :value: 'ChevronDown' .. py:attribute:: FULL_SCREEN :value: 'FullScreen' .. py:attribute:: MIX_VOLUMES :value: 'MixVolumes' .. py:attribute:: REMOVE_FROM :value: 'RemoveFrom' .. py:attribute:: RIGHT_ARROW :value: 'RightArrow' .. py:attribute:: QUIET_HOURS :value: 'QuietHours' .. py:attribute:: FINGERPRINT :value: 'Fingerprint' .. py:attribute:: APPLICATION :value: 'Application' .. py:attribute:: CERTIFICATE :value: 'Certificate' .. py:attribute:: TRANSPARENT :value: 'Transparent' .. py:attribute:: IMAGE_EXPORT :value: 'ImageExport' .. py:attribute:: SPEED_MEDIUM :value: 'SpeedMedium' .. py:attribute:: LIBRARY_FILL :value: 'LibraryFill' .. py:attribute:: MUSIC_FOLDER :value: 'MusicFolder' .. py:attribute:: POWER_BUTTON :value: 'PowerButton' .. py:attribute:: SKIP_FORWARD :value: 'SkipForward' .. py:attribute:: CARE_UP_SOLID :value: 'CareUpSolid' .. py:attribute:: ACCEPT_MEDIUM :value: 'AcceptMedium' .. py:attribute:: CANCEL_MEDIUM :value: 'CancelMedium' .. py:attribute:: CHEVRON_RIGHT :value: 'ChevronRight' .. py:attribute:: CLIPPING_TOOL :value: 'ClippingTool' .. py:attribute:: SEARCH_MIRROR :value: 'SearchMirror' .. py:attribute:: SHOPPING_CART :value: 'ShoppingCart' .. py:attribute:: FONT_INCREASE :value: 'FontIncrease' .. py:attribute:: BACK_TO_WINDOW :value: 'BackToWindow' .. py:attribute:: COMMAND_PROMPT :value: 'CommandPrompt' .. py:attribute:: CLOUD_DOWNLOAD :value: 'CloudDownload' .. py:attribute:: DICTIONARY_ADD :value: 'DictionaryAdd' .. py:attribute:: CARE_DOWN_SOLID :value: 'CareDownSolid' .. py:attribute:: CARE_LEFT_SOLID :value: 'CareLeftSolid' .. py:attribute:: CLEAR_SELECTION :value: 'ClearSelection' .. py:attribute:: DEVELOPER_TOOLS :value: 'DeveloperTools' .. py:attribute:: BACKGROUND_FILL :value: 'BackgroundColor' .. py:attribute:: CARE_RIGHT_SOLID :value: 'CareRightSolid' .. py:attribute:: CHEVRON_DOWN_MED :value: 'ChevronDownMed' .. py:attribute:: CHEVRON_RIGHT_MED :value: 'ChevronRightMed' .. py:attribute:: EMOJI_TAB_SYMBOLS :value: 'EmojiTabSymbols' .. py:attribute:: EXPRESSIVE_INPUT_ENTRY :value: 'ExpressiveInputEntry' .. py:method:: path(theme=Theme.AUTO) get the path of icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` .. py:function:: drawIcon(icon, painter, rect, state=QIcon.Off, **attributes) draw icon Parameters ---------- icon: str | QIcon | FluentIconBaseBase the icon to be drawn painter: QPainter painter rect: QRect | QRectF the rect to render icon **attribute: the attribute of svg icon .. py:class:: FluentIconBase Fluent icon base class .. py:method:: path(theme=Theme.AUTO) -> str :abstractmethod: get the path of icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` .. py:method:: icon(theme=Theme.AUTO, color: PyQt5.QtGui.QColor = None) -> PyQt5.QtGui.QIcon create a fluent icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `qconfig.theme` color: QColor | Qt.GlobalColor | str icon color, only applicable to svg icon .. py:method:: colored(lightColor: PyQt5.QtGui.QColor, darkColor: PyQt5.QtGui.QColor) -> ColoredFluentIcon create a colored fluent icon Parameters ---------- lightColor: str | QColor | Qt.GlobalColor icon color in light mode darkColor: str | QColor | Qt.GlobalColor icon color in dark mode .. py:method:: qicon(reverse=False) -> PyQt5.QtGui.QIcon convert to QIcon, the theme of icon will be updated synchronously with app Parameters ---------- reverse: bool whether to reverse the theme of icon .. py:method:: render(painter, rect, theme=Theme.AUTO, indexes=None, **attributes) draw svg icon Parameters ---------- painter: QPainter painter rect: QRect | QRectF the rect to render icon theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` indexes: List[int] the svg path to be modified **attributes: the attributes of modified path .. py:function:: writeSvg(iconPath: str, indexes=None, **attributes) write svg with specified attributes Parameters ---------- iconPath: str svg icon path indexes: List[int] the path to be filled **attributes: the attributes of path Returns ------- svg: str svg code .. py:function:: setStyleSheet(widget: PyQt5.QtWidgets.QWidget, source: Union[str, StyleSheetBase], theme=Theme.AUTO, register=True) set the style sheet of widget Parameters ---------- widget: QWidget the widget to set style sheet source: str | StyleSheetBase qss source, it could be: * `str`: qss file path * `StyleSheetBase`: style sheet instance theme: Theme the theme of style sheet register: bool whether to register the widget to the style manager. If `register=True`, the style of the widget will be updated automatically when the theme changes .. py:function:: getStyleSheet(source: Union[str, StyleSheetBase], theme=Theme.AUTO) get style sheet Parameters ---------- source: str | StyleSheetBase qss source, it could be: * `str`: qss file path * `StyleSheetBase`: style sheet instance theme: Theme the theme of style sheet .. py:function:: setTheme(theme: qfluentwidgets.common.config.Theme, save=False, lazy=False) set the theme of application Parameters ---------- theme: Theme theme mode save: bool whether to save the change to config file lazy: bool whether to update the style sheet lazily, set to `True` will accelerate theme switching .. py:class:: ThemeColor Bases: :py:obj:`enum.Enum` Theme color type .. py:attribute:: PRIMARY :value: 'ThemeColorPrimary' .. py:attribute:: DARK_1 :value: 'ThemeColorDark1' .. py:attribute:: DARK_2 :value: 'ThemeColorDark2' .. py:attribute:: DARK_3 :value: 'ThemeColorDark3' .. py:attribute:: LIGHT_1 :value: 'ThemeColorLight1' .. py:attribute:: LIGHT_2 :value: 'ThemeColorLight2' .. py:attribute:: LIGHT_3 :value: 'ThemeColorLight3' .. py:method:: name() The name of the Enum member. .. py:method:: color() .. py:function:: themeColor() get theme color .. py:function:: setThemeColor(color, save=False, lazy=False) set theme color Parameters ---------- color: QColor | Qt.GlobalColor | str theme color save: bool whether to save to change to config file lazy: bool whether to update the style sheet lazily .. py:function:: applyThemeColor(qss: str) apply theme color to style sheet Parameters ---------- qss: str the style sheet string to apply theme color, the substituted variable should be equal to the value of `ThemeColor` and starts width `--`, i.e `--ThemeColorPrimary` .. py:class:: FluentStyleSheet Bases: :py:obj:`StyleSheetBase`, :py:obj:`enum.Enum` Fluent style sheet .. py:attribute:: MENU :value: 'menu' .. py:attribute:: LABEL :value: 'label' .. py:attribute:: PIVOT :value: 'pivot' .. py:attribute:: BUTTON :value: 'button' .. py:attribute:: DIALOG :value: 'dialog' .. py:attribute:: SLIDER :value: 'slider' .. py:attribute:: INFO_BAR :value: 'info_bar' .. py:attribute:: SPIN_BOX :value: 'spin_box' .. py:attribute:: TAB_VIEW :value: 'tab_view' .. py:attribute:: TOOL_TIP :value: 'tool_tip' .. py:attribute:: CHECK_BOX :value: 'check_box' .. py:attribute:: COMBO_BOX :value: 'combo_box' .. py:attribute:: FLIP_VIEW :value: 'flip_view' .. py:attribute:: LINE_EDIT :value: 'line_edit' .. py:attribute:: LIST_VIEW :value: 'list_view' .. py:attribute:: TREE_VIEW :value: 'tree_view' .. py:attribute:: INFO_BADGE :value: 'info_badge' .. py:attribute:: PIPS_PAGER :value: 'pips_pager' .. py:attribute:: TABLE_VIEW :value: 'table_view' .. py:attribute:: CARD_WIDGET :value: 'card_widget' .. py:attribute:: TIME_PICKER :value: 'time_picker' .. py:attribute:: COLOR_DIALOG :value: 'color_dialog' .. py:attribute:: MEDIA_PLAYER :value: 'media_player' .. py:attribute:: SETTING_CARD :value: 'setting_card' .. py:attribute:: TEACHING_TIP :value: 'teaching_tip' .. py:attribute:: FLUENT_WINDOW :value: 'fluent_window' .. py:attribute:: SWITCH_BUTTON :value: 'switch_button' .. py:attribute:: MESSAGE_DIALOG :value: 'message_dialog' .. py:attribute:: STATE_TOOL_TIP :value: 'state_tool_tip' .. py:attribute:: CALENDAR_PICKER :value: 'calendar_picker' .. py:attribute:: FOLDER_LIST_DIALOG :value: 'folder_list_dialog' .. py:attribute:: SETTING_CARD_GROUP :value: 'setting_card_group' .. py:attribute:: EXPAND_SETTING_CARD :value: 'expand_setting_card' .. py:attribute:: NAVIGATION_INTERFACE :value: 'navigation_interface' .. py:method:: path(theme=Theme.AUTO) get the path of style sheet .. py:class:: StyleSheetBase Style sheet base class .. py:method:: path(theme=Theme.AUTO) :abstractmethod: get the path of style sheet .. py:method:: content(theme=Theme.AUTO) get the content of style sheet .. py:method:: apply(widget: PyQt5.QtWidgets.QWidget, theme=Theme.AUTO) apply style sheet to widget .. py:class:: StyleSheetFile(path: str) Bases: :py:obj:`StyleSheetBase` Style sheet file .. py:attribute:: filePath .. py:method:: path(theme=Theme.AUTO) get the path of style sheet .. py:class:: StyleSheetCompose(sources: List[StyleSheetBase]) Bases: :py:obj:`StyleSheetBase` Style sheet compose .. py:attribute:: sources .. py:method:: content(theme=Theme.AUTO) get the content of style sheet .. py:method:: add(source: StyleSheetBase) add style sheet source .. py:method:: remove(source: StyleSheetBase) remove style sheet source .. py:class:: CustomStyleSheet(widget: PyQt5.QtWidgets.QWidget) Bases: :py:obj:`StyleSheetBase` Custom style sheet .. py:attribute:: DARK_QSS_KEY :value: 'darkCustomQss' .. py:attribute:: LIGHT_QSS_KEY :value: 'lightCustomQss' .. py:method:: path(theme=Theme.AUTO) get the path of style sheet .. py:property:: widget .. py:method:: __eq__(other: object) -> bool .. py:method:: setCustomStyleSheet(lightQss: str, darkQss: str) set custom style sheet in light and dark theme mode .. py:method:: setLightStyleSheet(qss: str) set the style sheet in light mode .. py:method:: setDarkStyleSheet(qss: str) set the style sheet in dark mode .. py:method:: lightStyleSheet() -> str .. py:method:: darkStyleSheet() -> str .. py:method:: content(theme=Theme.AUTO) -> str get the content of style sheet .. py:function:: toggleTheme(save=False, lazy=False) toggle the theme of application Parameters ---------- save: bool whether to save the change to config file lazy: bool whether to update the style sheet lazily, set to `True` will accelerate theme switching .. py:function:: setCustomStyleSheet(widget: PyQt5.QtWidgets.QWidget, lightQss: str, darkQss: str) set custom style sheet Parameters ---------- widget: QWidget the widget to add style sheet lightQss: str style sheet used in light theme mode darkQss: str style sheet used in light theme mode .. py:class:: SmoothScroll(widget: PyQt5.QtWidgets.QScrollArea, orient=Qt.Vertical) Scroll smoothly .. py:attribute:: widget .. py:attribute:: orient .. py:attribute:: fps :value: 60 .. py:attribute:: duration :value: 400 .. py:attribute:: stepsTotal :value: 0 .. py:attribute:: stepRatio :value: 1.5 .. py:attribute:: acceleration :value: 1 .. py:attribute:: lastWheelEvent :value: None .. py:attribute:: scrollStamps .. py:attribute:: stepsLeftQueue .. py:attribute:: smoothMoveTimer .. py:attribute:: smoothMode .. py:method:: setSmoothMode(smoothMode) set smooth mode .. py:method:: wheelEvent(e) .. py:class:: SmoothMode Bases: :py:obj:`enum.Enum` Smooth mode .. py:attribute:: NO_SMOOTH :value: 0 .. py:attribute:: CONSTANT :value: 1 .. py:attribute:: LINEAR :value: 2 .. py:attribute:: QUADRATI :value: 3 .. py:attribute:: COSINE :value: 4 .. py:class:: FluentTranslator(locale: PyQt5.QtCore.QLocale = None, parent=None) Bases: :py:obj:`PyQt5.QtCore.QTranslator` Translator of fluent widgets .. py:method:: load(locale: PyQt5.QtCore.QLocale) load translation file .. py:data:: qrouter .. py:class:: Router(parent=None) Bases: :py:obj:`PyQt5.QtCore.QObject` Router .. py:attribute:: emptyChanged .. py:attribute:: history :type: List[RouteItem] :value: [] .. py:attribute:: stackHistories :type: Dict[PyQt5.QtWidgets.QStackedWidget, StackedHistory] .. py:method:: setDefaultRouteKey(stacked: PyQt5.QtWidgets.QStackedWidget, routeKey: str) set the default route key of stacked widget .. py:method:: push(stacked: PyQt5.QtWidgets.QStackedWidget, routeKey: str) push history Parameters ---------- stacked: QStackedWidget stacked widget routeKey: str route key of sub insterface, it should be the object name of sub interface .. py:method:: pop() pop history .. py:method:: remove(routeKey: str) remove history .. py:class:: FluentThemeColor Bases: :py:obj:`enum.Enum` Fluent theme color Refer to: https://www.figma.com/file/iM7EPX8Jn37zjeSezb43cF .. py:attribute:: YELLOW_GOLD :value: '#FFB900' .. py:attribute:: GOLD :value: '#FF8C00' .. py:attribute:: ORANGE_BRIGHT :value: '#F7630C' .. py:attribute:: ORANGE_DARK :value: '#CA5010' .. py:attribute:: RUST :value: '#DA3B01' .. py:attribute:: PALE_RUST :value: '#EF6950' .. py:attribute:: BRICK_RED :value: '#D13438' .. py:attribute:: MOD_RED :value: '#FF4343' .. py:attribute:: PALE_RED :value: '#E74856' .. py:attribute:: RED :value: '#E81123' .. py:attribute:: ROSE_BRIGHT :value: '#EA005E' .. py:attribute:: ROSE :value: '#C30052' .. py:attribute:: PLUM_LIGHT :value: '#E3008C' .. py:attribute:: PLUM :value: '#BF0077' .. py:attribute:: ORCHID_LIGHT :value: '#BF0077' .. py:attribute:: ORCHID :value: '#9A0089' .. py:attribute:: DEFAULT_BLUE :value: '#0078D7' .. py:attribute:: NAVY_BLUE :value: '#0063B1' .. py:attribute:: PURPLE_SHADOW :value: '#8E8CD8' .. py:attribute:: PURPLE_SHADOW_DARK :value: '#6B69D6' .. py:attribute:: IRIS_PASTEL :value: '#8764B8' .. py:attribute:: IRIS_SPRING :value: '#744DA9' .. py:attribute:: VIOLET_RED_LIGHT :value: '#B146C2' .. py:attribute:: VIOLET_RED :value: '#881798' .. py:attribute:: COOL_BLUE_BRIGHT :value: '#0099BC' .. py:attribute:: COOL_BLUR :value: '#2D7D9A' .. py:attribute:: SEAFOAM :value: '#00B7C3' .. py:attribute:: SEAFOAM_TEAL :value: '#038387' .. py:attribute:: MINT_LIGHT :value: '#00B294' .. py:attribute:: MINT_DARK :value: '#018574' .. py:attribute:: TURF_GREEN :value: '#00CC6A' .. py:attribute:: SPORT_GREEN :value: '#10893E' .. py:attribute:: GRAY :value: '#7A7574' .. py:attribute:: GRAY_BROWN :value: '#5D5A58' .. py:attribute:: STEAL_BLUE :value: '#68768A' .. py:attribute:: METAL_BLUE :value: '#515C6B' .. py:attribute:: PALE_MOSS :value: '#567C73' .. py:attribute:: MOSS :value: '#486860' .. py:attribute:: MEADOW_GREEN :value: '#498205' .. py:attribute:: GREEN :value: '#107C10' .. py:attribute:: OVERCAST :value: '#767676' .. py:attribute:: STORM :value: '#4C4A48' .. py:attribute:: BLUE_GRAY :value: '#69797E' .. py:attribute:: GRAY_DARK :value: '#4A5459' .. py:attribute:: LIDDY_GREEN :value: '#647C64' .. py:attribute:: SAGE :value: '#525E54' .. py:attribute:: CAMOUFLAGE_DESERT :value: '#847545' .. py:attribute:: CAMOUFLAGE :value: '#7E735F' .. py:method:: color() .. py:class:: SystemThemeListener(parent=None) Bases: :py:obj:`PyQt5.QtCore.QThread` System theme listener .. py:attribute:: systemThemeChanged .. py:method:: run() .. py:function:: exceptionHandler(*default) decorator for exception handling Parameters ---------- *default: the default value returned when an exception occurs .. py:data:: ALERT :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ 📢 Tips: QFluentWidgets Pro is now released. Click https://qfluentwidgets.com/pages/pro to learn more about it. """ .. raw:: html
.. py:class:: Theme Bases: :py:obj:`enum.Enum` Theme enumeration .. py:attribute:: LIGHT :value: 'Light' .. py:attribute:: DARK :value: 'Dark' .. py:attribute:: AUTO :value: 'Auto' .. py:class:: ConfigValidator Config validator .. py:method:: validate(value) Verify whether the value is legal .. py:method:: correct(value) correct illegal value .. py:class:: RangeValidator(min, max) Bases: :py:obj:`ConfigValidator` Range validator .. py:attribute:: min .. py:attribute:: max .. py:attribute:: range .. py:method:: validate(value) Verify whether the value is legal .. py:method:: correct(value) correct illegal value .. py:class:: OptionsValidator(options) Bases: :py:obj:`ConfigValidator` Options validator .. py:attribute:: options .. py:method:: validate(value) Verify whether the value is legal .. py:method:: correct(value) correct illegal value .. py:class:: BoolValidator Bases: :py:obj:`OptionsValidator` Boolean validator .. py:class:: FolderValidator Bases: :py:obj:`ConfigValidator` Folder validator .. py:method:: validate(value) Verify whether the value is legal .. py:method:: correct(value) correct illegal value .. py:class:: FolderListValidator Bases: :py:obj:`ConfigValidator` Folder list validator .. py:method:: validate(value) Verify whether the value is legal .. py:method:: correct(value: List[str]) correct illegal value .. py:class:: ColorValidator(default) Bases: :py:obj:`ConfigValidator` RGB color validator .. py:attribute:: default .. py:method:: validate(color) Verify whether the value is legal .. py:method:: correct(value) correct illegal value .. py:class:: ConfigSerializer Config serializer .. py:method:: serialize(value) serialize config value .. py:method:: deserialize(value) deserialize config from config file's value .. py:class:: EnumSerializer(enumClass) Bases: :py:obj:`ConfigSerializer` enumeration class serializer .. py:attribute:: enumClass .. py:method:: serialize(value) serialize config value .. py:method:: deserialize(value) deserialize config from config file's value .. py:class:: ColorSerializer Bases: :py:obj:`ConfigSerializer` QColor serializer .. py:method:: serialize(value: PyQt5.QtGui.QColor) serialize config value .. py:method:: deserialize(value) deserialize config from config file's value .. py:class:: ConfigItem(group, name, default, validator=None, serializer=None, restart=False) Bases: :py:obj:`PyQt5.QtCore.QObject` Config item .. py:attribute:: valueChanged .. py:attribute:: group .. py:attribute:: name .. py:attribute:: validator .. py:attribute:: serializer .. py:property:: value get the value of config item .. py:attribute:: restart .. py:attribute:: defaultValue .. py:property:: key get the config key separated by `.` .. py:method:: __str__() .. py:method:: serialize() .. py:method:: deserializeFrom(value) .. py:class:: RangeConfigItem(group, name, default, validator=None, serializer=None, restart=False) Bases: :py:obj:`ConfigItem` Config item of range .. py:property:: range get the available range of config .. py:method:: __str__() .. py:class:: OptionsConfigItem(group, name, default, validator=None, serializer=None, restart=False) Bases: :py:obj:`ConfigItem` Config item with options .. py:property:: options .. py:method:: __str__() .. py:class:: ColorConfigItem(group, name, default, restart=False) Bases: :py:obj:`ConfigItem` Color config item .. py:method:: __str__() .. py:class:: QConfig Bases: :py:obj:`PyQt5.QtCore.QObject` Config of app .. py:attribute:: appRestartSig .. py:attribute:: themeChanged .. py:attribute:: themeChangedFinished .. py:attribute:: themeColorChanged .. py:attribute:: themeMode .. py:attribute:: themeColor .. py:attribute:: file .. py:method:: get(item) get the value of config item .. py:method:: set(item, value, save=True, copy=True) set the value of config item Parameters ---------- item: ConfigItem config item value: the new value of config item save: bool whether to save the change to config file copy: bool whether to deep copy the new value .. py:method:: toDict(serialize=True) convert config items to `dict` .. py:method:: save() save config .. py:method:: load(file=None, config=None) load config Parameters ---------- file: str or Path the path of json config file config: Config config object to be initialized .. py:property:: theme get theme mode, can be `Theme.Light` or `Theme.Dark` .. py:data:: qconfig .. py:function:: isDarkTheme() whether the theme is dark mode .. py:function:: theme() get theme mode .. py:class:: FluentWindow(parent=None) Bases: :py:obj:`FluentWindowBase` Fluent window .. py:attribute:: navigationInterface .. py:attribute:: widgetLayout .. py:method:: addSubInterface(interface: PyQt5.QtWidgets.QWidget, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str], text: str, position=NavigationItemPosition.TOP, parent=None, isTransparent=False) -> qfluentwidgets.components.navigation.NavigationTreeWidget add sub interface, the object name of `interface` should be set already before calling this method Parameters ---------- interface: QWidget the subinterface to be added icon: FluentIconBase | QIcon | str the icon of navigation item text: str the text of navigation item position: NavigationItemPosition the position of navigation item parent: QWidget the parent of navigation item isTransparent: bool whether to use transparent background .. py:method:: resizeEvent(e) .. py:class:: MSFluentWindow(parent=None) Bases: :py:obj:`FluentWindowBase` Fluent window in Microsoft Store style .. py:attribute:: navigationInterface .. py:method:: addSubInterface(interface: PyQt5.QtWidgets.QWidget, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str], text: str, selectedIcon=None, position=NavigationItemPosition.TOP, isTransparent=False) -> qfluentwidgets.components.navigation.NavigationBarPushButton add sub interface, the object name of `interface` should be set already before calling this method Parameters ---------- interface: QWidget the subinterface to be added icon: FluentIconBase | QIcon | str the icon of navigation item text: str the text of navigation item selectedIcon: str | QIcon | FluentIconBase the icon of navigation item in selected state position: NavigationItemPosition the position of navigation item .. py:class:: SplitFluentWindow(parent=None) Bases: :py:obj:`FluentWindow` Fluent window with split style .. py:class:: FluentTitleBar(parent) Bases: :py:obj:`qframelesswindow.TitleBar` Fluent title bar .. py:attribute:: iconLabel .. py:attribute:: titleLabel .. py:attribute:: vBoxLayout .. py:attribute:: buttonLayout .. py:method:: setTitle(title) .. py:method:: setIcon(icon) .. py:class:: MSFluentTitleBar(parent) Bases: :py:obj:`FluentTitleBar` Fluent title bar .. py:class:: SplitTitleBar(parent) Bases: :py:obj:`qframelesswindow.TitleBar` Title bar with minimize, maximum and close button .. py:attribute:: iconLabel .. py:attribute:: titleLabel .. py:method:: setTitle(title) .. py:method:: setIcon(icon) .. py:class:: FluentBackgroundTheme Fluent background theme .. py:attribute:: DEFAULT .. py:attribute:: DEFAULT_BLUE .. py:class:: SplashScreen(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase], parent=None, enableShadow=True) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Splash screen .. py:attribute:: titleBar .. py:attribute:: iconWidget .. py:attribute:: shadowEffect .. py:method:: setIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase]) .. py:method:: icon() .. py:method:: setIconSize(size: PyQt5.QtCore.QSize) .. py:method:: iconSize() .. py:method:: setTitleBar(titleBar: PyQt5.QtWidgets.QWidget) set title bar .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: resizeEvent(e) .. py:method:: finish() close splash screen .. py:method:: paintEvent(e)