components ========== .. py:module:: qfluentwidgets.components .. toctree:: :titlesonly: :maxdepth: 3 date_time/index.rst dialog_box/index.rst layout/index.rst material/index.rst navigation/index.rst settings/index.rst widgets/index.rst Package Contents ---------------- .. autoapisummary:: qfluentwidgets.components.ColorDialog qfluentwidgets.components.Dialog qfluentwidgets.components.MessageBox qfluentwidgets.components.FolderListDialog qfluentwidgets.components.MessageDialog qfluentwidgets.components.MessageBoxBase qfluentwidgets.components.MaskDialogBase qfluentwidgets.components.ExpandLayout qfluentwidgets.components.FlowLayout qfluentwidgets.components.AdaptiveFlowLayout qfluentwidgets.components.VBoxLayout qfluentwidgets.components.SettingCard qfluentwidgets.components.SwitchSettingCard qfluentwidgets.components.RangeSettingCard qfluentwidgets.components.PushSettingCard qfluentwidgets.components.ColorSettingCard qfluentwidgets.components.HyperlinkCard qfluentwidgets.components.PrimaryPushSettingCard qfluentwidgets.components.ColorPickerButton qfluentwidgets.components.ComboBoxSettingCard qfluentwidgets.components.ExpandSettingCard qfluentwidgets.components.ExpandGroupSettingCard qfluentwidgets.components.SimpleExpandGroupSettingCard qfluentwidgets.components.FolderListSettingCard qfluentwidgets.components.OptionsSettingCard qfluentwidgets.components.CustomColorSettingCard qfluentwidgets.components.SettingCardGroup qfluentwidgets.components.DropDownPushButton qfluentwidgets.components.DropDownToolButton qfluentwidgets.components.PrimaryPushButton qfluentwidgets.components.PushButton qfluentwidgets.components.RadioButton qfluentwidgets.components.HyperlinkButton qfluentwidgets.components.ToolButton qfluentwidgets.components.TransparentToolButton qfluentwidgets.components.ToggleButton qfluentwidgets.components.SplitWidgetBase qfluentwidgets.components.SplitPushButton qfluentwidgets.components.SplitToolButton qfluentwidgets.components.PrimaryToolButton qfluentwidgets.components.PrimarySplitPushButton qfluentwidgets.components.PrimarySplitToolButton qfluentwidgets.components.PrimaryDropDownPushButton qfluentwidgets.components.PrimaryDropDownToolButton qfluentwidgets.components.ToggleToolButton qfluentwidgets.components.TransparentPushButton qfluentwidgets.components.TransparentTogglePushButton qfluentwidgets.components.TransparentToggleToolButton qfluentwidgets.components.TransparentDropDownPushButton qfluentwidgets.components.TransparentDropDownToolButton qfluentwidgets.components.PillPushButton qfluentwidgets.components.PillToolButton qfluentwidgets.components.CardWidget qfluentwidgets.components.ElevatedCardWidget qfluentwidgets.components.SimpleCardWidget qfluentwidgets.components.HeaderCardWidget qfluentwidgets.components.CardGroupWidget qfluentwidgets.components.GroupHeaderCardWidget qfluentwidgets.components.CheckBox qfluentwidgets.components.ComboBox qfluentwidgets.components.EditableComboBox qfluentwidgets.components.ModelComboBox qfluentwidgets.components.EditableModelComboBox qfluentwidgets.components.CommandBar qfluentwidgets.components.CommandButton qfluentwidgets.components.CommandBarView qfluentwidgets.components.FlipView qfluentwidgets.components.HorizontalFlipView qfluentwidgets.components.VerticalFlipView qfluentwidgets.components.FlipImageDelegate qfluentwidgets.components.LineEdit qfluentwidgets.components.TextEdit qfluentwidgets.components.PlainTextEdit qfluentwidgets.components.LineEditButton qfluentwidgets.components.SearchLineEdit qfluentwidgets.components.PasswordLineEdit qfluentwidgets.components.TextBrowser qfluentwidgets.components.IconWidget qfluentwidgets.components.PixmapLabel qfluentwidgets.components.CaptionLabel qfluentwidgets.components.StrongBodyLabel qfluentwidgets.components.BodyLabel qfluentwidgets.components.SubtitleLabel qfluentwidgets.components.TitleLabel qfluentwidgets.components.LargeTitleLabel qfluentwidgets.components.DisplayLabel qfluentwidgets.components.FluentLabelBase qfluentwidgets.components.ImageLabel qfluentwidgets.components.AvatarWidget qfluentwidgets.components.HyperlinkLabel qfluentwidgets.components.ListWidget qfluentwidgets.components.ListView qfluentwidgets.components.ListItemDelegate qfluentwidgets.components.DWMMenu qfluentwidgets.components.LineEditMenu qfluentwidgets.components.RoundMenu qfluentwidgets.components.MenuAnimationManager qfluentwidgets.components.MenuAnimationType qfluentwidgets.components.IndicatorMenuItemDelegate qfluentwidgets.components.MenuItemDelegate qfluentwidgets.components.ShortcutMenuItemDelegate qfluentwidgets.components.CheckableMenu qfluentwidgets.components.MenuIndicatorType qfluentwidgets.components.SystemTrayMenu qfluentwidgets.components.CheckableSystemTrayMenu qfluentwidgets.components.InfoBar qfluentwidgets.components.InfoBarIcon qfluentwidgets.components.InfoBarPosition qfluentwidgets.components.InfoBarManager qfluentwidgets.components.InfoBadge qfluentwidgets.components.InfoLevel qfluentwidgets.components.DotInfoBadge qfluentwidgets.components.IconInfoBadge qfluentwidgets.components.InfoBadgePosition qfluentwidgets.components.InfoBadgeManager qfluentwidgets.components.SingleDirectionScrollArea qfluentwidgets.components.SmoothMode qfluentwidgets.components.SmoothScrollArea qfluentwidgets.components.ScrollArea qfluentwidgets.components.Slider qfluentwidgets.components.HollowHandleStyle qfluentwidgets.components.ClickableSlider qfluentwidgets.components.SpinBox qfluentwidgets.components.DoubleSpinBox qfluentwidgets.components.DateEdit qfluentwidgets.components.DateTimeEdit qfluentwidgets.components.TimeEdit qfluentwidgets.components.CompactSpinBox qfluentwidgets.components.CompactDoubleSpinBox qfluentwidgets.components.CompactDateEdit qfluentwidgets.components.CompactDateTimeEdit qfluentwidgets.components.CompactTimeEdit qfluentwidgets.components.PopUpAniStackedWidget qfluentwidgets.components.OpacityAniStackedWidget qfluentwidgets.components.TransitionStackedWidget qfluentwidgets.components.EntranceTransitionStackedWidget qfluentwidgets.components.DrillInTransitionStackedWidget qfluentwidgets.components.StateToolTip qfluentwidgets.components.SwitchButton qfluentwidgets.components.IndicatorPosition qfluentwidgets.components.TableView qfluentwidgets.components.TableWidget qfluentwidgets.components.TableItemDelegate qfluentwidgets.components.ToolTip qfluentwidgets.components.ToolTipFilter qfluentwidgets.components.ToolTipPosition qfluentwidgets.components.TreeWidget qfluentwidgets.components.TreeView qfluentwidgets.components.TreeItemDelegate qfluentwidgets.components.CycleListWidget qfluentwidgets.components.IndeterminateProgressBar qfluentwidgets.components.ProgressBar qfluentwidgets.components.ProgressRing qfluentwidgets.components.IndeterminateProgressRing qfluentwidgets.components.ScrollBar qfluentwidgets.components.SmoothScrollBar qfluentwidgets.components.SmoothScrollDelegate qfluentwidgets.components.ScrollBarHandleDisplayMode qfluentwidgets.components.TeachingTip qfluentwidgets.components.TeachingTipTailPosition qfluentwidgets.components.TeachingTipView qfluentwidgets.components.PopupTeachingTip qfluentwidgets.components.FlyoutView qfluentwidgets.components.FlyoutViewBase qfluentwidgets.components.Flyout qfluentwidgets.components.FlyoutAnimationType qfluentwidgets.components.FlyoutAnimationManager qfluentwidgets.components.TabBar qfluentwidgets.components.TabItem qfluentwidgets.components.TabCloseButtonDisplayMode qfluentwidgets.components.TabWidget qfluentwidgets.components.PipsPager qfluentwidgets.components.VerticalPipsPager qfluentwidgets.components.HorizontalPipsPager qfluentwidgets.components.PipsScrollButtonDisplayMode qfluentwidgets.components.HorizontalSeparator qfluentwidgets.components.VerticalSeparator qfluentwidgets.components.NavigationWidget qfluentwidgets.components.NavigationPushButton qfluentwidgets.components.NavigationSeparator qfluentwidgets.components.NavigationToolButton qfluentwidgets.components.NavigationTreeWidget qfluentwidgets.components.NavigationTreeWidgetBase qfluentwidgets.components.NavigationAvatarWidget qfluentwidgets.components.NavigationItemHeader qfluentwidgets.components.NavigationUserCard qfluentwidgets.components.NavigationPanel qfluentwidgets.components.NavigationItemPosition qfluentwidgets.components.NavigationDisplayMode qfluentwidgets.components.NavigationInterface qfluentwidgets.components.NavigationBarPushButton qfluentwidgets.components.NavigationBar qfluentwidgets.components.Pivot qfluentwidgets.components.PivotItem qfluentwidgets.components.SegmentedItem qfluentwidgets.components.SegmentedWidget qfluentwidgets.components.SegmentedToolItem qfluentwidgets.components.SegmentedToolWidget qfluentwidgets.components.SegmentedToggleToolItem qfluentwidgets.components.SegmentedToggleToolWidget qfluentwidgets.components.BreadcrumbBar qfluentwidgets.components.BreadcrumbItem qfluentwidgets.components.CalendarPicker qfluentwidgets.components.FastCalendarPicker qfluentwidgets.components.DatePickerBase qfluentwidgets.components.DatePicker qfluentwidgets.components.ZhDatePicker qfluentwidgets.components.PickerBase qfluentwidgets.components.PickerPanel qfluentwidgets.components.PickerColumnFormatter qfluentwidgets.components.TimePicker qfluentwidgets.components.AMTimePicker .. autoapisummary:: qfluentwidgets.components.TogglePushButton .. 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 :value: False .. 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: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:: setDraggable(draggable: bool) .. py:method:: isDraggable() -> 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 :value: False .. py:attribute:: isTight :value: False .. 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:: AdaptiveFlowLayout(parent=None, needAni=False, isTight=False) Bases: :py:obj:`FlowLayout` Flow layout .. py:method:: setWidgetMinimumWidth(width: int) .. py:method:: widgetMinimumWidth() .. py:method:: setWidgetMaximumWidth(width) .. py:method:: widgetMaximumWidth() .. 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 :value: None .. 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 :value: False .. 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:attribute:: widgets :type: List[PyQt5.QtWidgets.QWidget] :value: [] .. py:method:: addGroupWidget(widget: PyQt5.QtWidgets.QWidget) add widget to group .. py:method:: addGroup(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str, widget: PyQt5.QtWidgets.QWidget, stretch=0) -> GroupWidget add group Parameters ---------- icon: str | QIcon | FluentIconBase the icon of group title: str the title of group content: str the description of group widget: str the widget of group stretch: int the stretch of widget .. py:method:: removeGroupWidget(widget: PyQt5.QtWidgets.QWidget) remove a group from card .. py:class:: SimpleExpandGroupSettingCard(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon], title: str, content: str = None, parent=None) Bases: :py:obj:`ExpandGroupSettingCard` Simple expand group setting card .. 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 :value: [] .. 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 :value: False .. 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:attribute:: lightIndicatorColor .. py:attribute:: darkIndicatorColor .. py:attribute:: indicatorPos .. py:attribute:: isHover :value: False .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: paintEvent(e) .. py:method:: textColor() .. py:method:: getLightTextColor() -> PyQt5.QtGui.QColor .. py:method:: getDarkTextColor() -> PyQt5.QtGui.QColor .. py:method:: setLightTextColor(color: PyQt5.QtGui.QColor) .. py:method:: setDarkTextColor(color: PyQt5.QtGui.QColor) .. py:method:: setIndicatorColor(light, dark) .. py:method:: setTextColor(light, dark) .. py:attribute:: lightTextColor .. py:attribute:: darkTextColor .. 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) * HyperlinkButton(`icon`: QIcon | FluentIconBase, `url`: str, `text`: str, `parent`: QWidget = 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 | FluentIconBase, `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:attribute:: lightCheckedColor .. py:attribute:: darkCheckedColor .. py:attribute:: lightTextColor .. py:attribute:: darkTextColor .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: setCheckedColor(light, dark) set the color of indicator in checked status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor indicator color in light/dark theme mode .. py:method:: setTextColor(light, dark) set the color of text Parameters ---------- light, dark: str | QColor | Qt.GlobalColor text color in light/dark theme mode .. 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:: ModelComboBox(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QPushButton`, :py:obj:`ModelComboBoxBase` Combo box build in data model .. py:attribute:: currentIndexChanged .. py:attribute:: currentTextChanged .. py:attribute:: activated .. py:attribute:: textActivated .. py:attribute:: arrowAni .. py:method:: setIconVisible(isVisible: bool) .. py:method:: isIconVisible() .. py:method:: setPlaceholderText(text: str) .. py:method:: setCurrentIndex(index: int) set current index Parameters ---------- index: int current index .. py:method:: clear() Clears the combobox, removing all items. .. py:method:: setItemIcon(index, icon) Sets the data role for the item on the given index .. py:method:: mouseReleaseEvent(e) .. py:method:: paintEvent(e) .. py:class:: EditableModelComboBox(parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.line_edit.LineEdit`, :py:obj:`ModelComboBoxBase` Editable combo box build in data model .. 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:: lightFocusedBorderColor .. py:attribute:: darkFocusedBorderColor .. py:attribute:: leftButtons :type: List[LineEditButton] :value: [] .. py:attribute:: rightButtons :type: List[LineEditButton] :value: [] .. py:attribute:: hBoxLayout .. py:attribute:: clearButton .. py:method:: isError() .. py:method:: setError(isError: bool) set the error status .. py:method:: setCustomFocusedBorderColor(light, dark) set the border color in focused status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor border color in light/dark theme mode .. py:method:: focusedBorderColor() .. 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:: setImage(image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None) set the image of label .. py:method:: setBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor) .. 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:: setTitle(title: str) .. 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(parent=None) Bases: :py:obj:`MenuItemDelegate` Menu item delegate with indicator .. py:method:: paint(painter: PyQt5.QtGui.QPainter, option, index) .. py:class:: MenuItemDelegate(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` Menu item delegate .. py:attribute:: tooltipDelegate :value: None .. py:method:: paint(painter, option, index) .. py:method:: helpEvent(event, view, option, index) .. py:class:: ShortcutMenuItemDelegate(parent=None) 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 :value: 1000 .. py:attribute:: isClosable :value: True .. 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:method:: desktopView() :classmethod: Returns the desktop container .. 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:: setSmoothMode(mode: qfluentwidgets.common.smooth_scroll.SmoothMode, orientation: PyQt5.QtCore.Qt.Orientation) set smooth mode Parameters ---------- mode: SmoothMode smooth scroll mode orientation: Qt.Orientation scroll direction .. 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:: setThemeColor(light, dark) .. 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: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:attribute:: isAnimationEnabled :value: True .. 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:: setAnimationEnabled(isEnabled: bool) set whether the pop animation is enabled .. 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:: TransitionStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` .. py:attribute:: aniFinished .. py:attribute:: aniStart .. py:method:: setAnimationEnabled(isEnabled: bool) set whether the transition animation is enabled .. py:method:: isAnimationEnabled() -> bool return whether the transition animation is enabled .. py:method:: addWidget(w) .. py:method:: insertWidget(index, w) .. py:method:: setCurrentWidget(widget: PyQt5.QtWidgets.QWidget, duration: int = None, isBack: bool = False) set current page widget with transition animation Parameters ---------- widget: QWidget target widget to display duration: int animation duration in milliseconds, None for default isBack: bool whether this is a back navigation .. py:method:: setCurrentIndex(index: int, duration: int = None, isBack: bool = False) set current page index with transition animation Parameters ---------- index: int page index duration: int animation duration in milliseconds, None for default isBack: bool whether this is a back navigation .. py:class:: EntranceTransitionStackedWidget(parent=None) Bases: :py:obj:`TransitionStackedWidget` .. py:class:: DrillInTransitionStackedWidget(parent=None) Bases: :py:obj:`TransitionStackedWidget` .. 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:: lightTextColor .. py:attribute:: darkTextColor .. 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:: setTextColor(light, dark) set the color of text Parameters ---------- light, dark: str | QColor | Qt.GlobalColor text color in light/dark theme mode .. py:method:: setCheckedIndicatorColor(light, dark) set the color of indicator in checked status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor border color in light/dark theme mode .. 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 :value: -1 .. py:attribute:: pressedRow :value: -1 .. py:attribute:: selectedRows .. py:attribute:: lightCheckedColor .. py:attribute:: darkCheckedColor .. 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:: setCheckedColor(light, dark) set the color of indicator in checked status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor color in light/dark theme mode .. py:method:: initStyleOption(option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) .. py:method:: paint(painter, option, index) .. py:method:: helpEvent(event: PyQt5.QtGui.QHelpEvent, view: PyQt5.QtWidgets.QAbstractItemView, option: PyQt5.QtWidgets.QStyleOptionViewItem, index: PyQt5.QtCore.QModelIndex) -> bool .. 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:method:: viewportEvent(event) Catch the click event to override the item "expand/collapse" function which is still called in the place it was before moving the branches in the drawBranches method. .. py:class:: TreeView(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QTreeView`, :py:obj:`TreeViewBase` Tree view .. py:method:: viewportEvent(event) Catch the click event to override the item "expand/collapse" function which is still called in the place it was before moving the branches in the drawBranches method. .. py:class:: TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView) Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate` Tree item delegate .. py:attribute:: lightCheckedColor .. py:attribute:: darkCheckedColor .. py:method:: setCheckedColor(light, dark) set the color of indicator in checked status Parameters ---------- light, dark: str | QColor | Qt.GlobalColor color in light/dark theme mode .. 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:: setScrollButtonRepeatEnabled(isEnabled: bool) set whether to enable scroll button auto repeat .. 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:: handleDisplayMode .. 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:: setHandleColor(light, dark) set the color of handle Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setArrowColor(light, dark) set the color of arrow button Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setGrooveColor(light, dark) set the color of groove Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setHandleDisplayMode(mode: ScrollBarHandleDisplayMode) set the display mode of handle .. 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 :value: False .. py:attribute:: vScrollBar .. py:attribute:: hScrollBar .. py:attribute:: verticalSmoothScroll .. py:attribute:: horizonSmoothScroll .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: setVerticalScrollBarPolicy(policy) .. py:method:: setHorizontalScrollBarPolicy(policy) .. py:class:: ScrollBarHandleDisplayMode Bases: :py:obj:`enum.Enum` Scroll bar handle display mode .. py:attribute:: ALWAYS :value: 0 .. py:attribute:: ON_HOVER :value: 1 .. 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 :value: 1000 .. py:attribute:: isDeleteOnClose :value: True .. 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 :value: None .. py:attribute:: title .. py:attribute:: image :value: None .. py:attribute:: content .. py:attribute:: isClosable :value: False .. 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, isMacInputMethodEnabled=False) 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 :value: True .. py:attribute:: isMacInputMethodEnabled :value: False .. py:method:: eventFilter(watched, event) .. 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, isMacInputMethodEnabled=False) :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, isMacInputMethodEnabled=False) :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:: tabBarDoubleClicked .. py:attribute:: tabCloseRequested .. py:attribute:: tabAddRequested .. py:attribute:: tabMoved .. 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:: tabData(index: int) .. py:method:: setTabData(index: int, data) .. py:method:: tabText(index: int) .. py:method:: tabIcon(index: int) .. py:method:: tabToolTip(index: int) .. py:method:: isTabEnabled(index: int) .. py:method:: setTabEnabled(index: int, isEnabled: bool) .. 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:: isTabVisible(index: int) .. 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:: clear() Remove all 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:attribute:: doubleClicked .. 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:: mouseDoubleClickEvent(e: PyQt5.QtGui.QMouseEvent) .. 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:: TabWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` .. py:attribute:: currentChanged .. py:attribute:: tabBarClicked .. py:attribute:: tabCloseRequested .. py:attribute:: tabAddRequested .. py:attribute:: tabBarDoubleClicked .. py:attribute:: tabBar .. py:attribute:: stackedWidget .. py:attribute:: vBoxLayout .. py:method:: addPage(widget: PyQt5.QtWidgets.QWidget, label: str, icon: Union[PyQt5.QtGui.QIcon, str, qfluentwidgets.common.icon.FluentIconBase] = None, routeKey=None) -> int Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar. Parameters ---------- widget: QWidget the widget in the new tab label: str the title of tab icon: str | QIcon | FluentIconBase the icon of tab routeKey: str the route key of new tab, if not provided, an unique uuid will be generated as route key Returns ------- index: int the index of the tab .. py:method:: addTab(widget: PyQt5.QtWidgets.QWidget, label: str, icon: Union[PyQt5.QtGui.QIcon, str, qfluentwidgets.common.icon.FluentIconBase] = None, routeKey=None) -> int Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar. Parameters ---------- widget: QWidget the widget in the new tab label: str the title of tab icon: str | QIcon | FluentIconBase the icon of tab routeKey: str the route key of new tab, if not provided, an unique uuid will be generated as route key Returns ------- index: int the index of the tab .. py:method:: insertTab(index: int, widget: PyQt5.QtWidgets.QWidget, label: str, icon: Union[PyQt5.QtGui.QIcon, str, qfluentwidgets.common.icon.FluentIconBase] = None, routeKey=None) -> int Inserts a tab with the given label and page into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar. Parameters ---------- index: int the index of new tab to be inserted widget: QWidget the widget in the new tab label: str the title of tab icon: str | QIcon | FluentIconBase the icon of tab routeKey: str the route key of new tab, if not provided, an unique uuid will be generated as route key Returns ------- index: int the index of the tab .. py:method:: removeTab(index: int) Removes the tab at position index from this stack of widgets. The page widget itself is not deleted. Parameters ---------- index: int the index of removed widget .. py:method:: clear() Removes all the pages, but does not delete them. .. py:method:: widget(index: int) Returns the tab page at index position index or `None` if the index is out of range. .. py:method:: currentWidget() -> PyQt5.QtWidgets.QWidget Returns a pointer to the page currently being displayed. .. py:method:: currentIndex() Returns the index position of the current tab page, returns -1 if there is no current widget. .. py:method:: setTabBar(tabBar) Replaces the original tab bar with new one. Note that this must be called before any tabs have been added, or the behavior is undefined. .. py:method:: isMovable() Returns whether the user can move the tabs within the tabbar area. .. py:method:: setMovable(movable: bool) .. py:method:: isTabEnabled(index: int) .. py:method:: setTabEnabled(index: int, isEnabled: bool) .. py:method:: isTabVisible(index: int) .. py:method:: setTabVisible(index: int, isVisible: bool) .. py:method:: tabText(index: int) .. py:method:: tabIcon(index: int) .. py:method:: tabToolTip(index: int) .. py:method:: setTabsClosable(closable: bool) .. py:method:: tabsClosable() -> bool .. py:method:: setTabIcon(index: int, icon: Union[PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase, str]) .. py:method:: setTabText(index: int, text: str) .. py:method:: setTabToolTip(index: int, tip: str) .. py:method:: setTabTextColor(index: int, color) .. py:method:: setTabSelectedBackgroundColor(light, dark) .. py:method:: setTabShadowEnabled(enabled: bool) .. py:method:: setScrollable(scrollable: bool) .. py:method:: isScrollable() -> bool .. py:method:: setTabMaximumWidth(width: int) .. py:method:: setTabMinimumWidth(width: int) .. py:method:: tabMaximumWidth() -> int .. py:method:: tabMinimumWidth() -> int .. py:method:: tabData(index: int) .. py:method:: setTabData(index: int, data) .. py:method:: count() -> int Returns the number of tabs in the tab bar. .. py:method:: setCurrentIndex(index: int) the index of the tab bar's visible tab .. py:method:: setCurrentWidget(widget: PyQt5.QtWidgets.QWidget) Sets the current tab to the tab which contains the given widget. .. py:method:: setCloseButtonDisplayMode(mode: TabCloseButtonDisplayMode) .. 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:: isAboutSelected :value: False .. py:attribute:: isSelectable .. py:attribute:: treeParent :value: None .. py:attribute:: nodeDepth :value: 0 .. py:attribute:: lightTextColor .. py:attribute:: darkTextColor .. py:attribute:: lightIndicatorColor .. py:attribute:: darkIndicatorColor .. 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:method:: setAboutSelected(selected: bool) .. py:method:: indicatorRect() get the indicator geometry .. py:method:: setIndicatorColor(light, dark) .. 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:: setIndicatorColor(light, dark) set the indicator 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:method:: setAboutSelected(selected: bool) .. py:method:: setRememberExpandState(remember: bool) set whether to remember expand state .. py:method:: saveExpandState() save current expand state .. py:method:: restoreExpandState(ani=True) restore saved expand state .. 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:method:: setRememberExpandState(remember: bool) :abstractmethod: set whether to remember expand state .. py:method:: saveExpandState() :abstractmethod: save current expand state .. py:method:: restoreExpandState(ani=True) :abstractmethod: restore saved expand state .. py:class:: NavigationAvatarWidget(name: str, avatar: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, parent=None) Bases: :py:obj:`NavigationWidget` Avatar widget .. py:attribute:: name .. py:attribute:: avatar .. py:method:: setName(name: str) .. py:method:: setAvatar(avatar: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage]) .. py:method:: paintEvent(e) .. py:class:: NavigationItemHeader(text: str, parent=None) Bases: :py:obj:`NavigationWidget` Navigation item header for grouping items .. py:attribute:: lightTextColor .. py:attribute:: darkTextColor .. py:attribute:: heightAni .. py:method:: text() .. py:method:: setText(text: str) .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:method:: mousePressEvent(e) .. py:method:: mouseReleaseEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: paintEvent(e) .. py:class:: NavigationUserCard(parent=None) Bases: :py:obj:`NavigationAvatarWidget` Navigation user card widget .. py:method:: setAvatarIcon(icon: qfluentwidgets.common.icon.FluentIcon) set avatar icon when no image is set .. py:method:: setAvatarBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor) set avatar background color in light/dark theme mode .. py:method:: title() get user card title .. py:method:: setTitle(title: str) set user card title .. py:method:: subtitle() get user card subtitle .. py:method:: setSubtitle(subtitle: str) set user card subtitle .. py:method:: setTitleFontSize(size: int) set title font size .. py:method:: setSubtitleFontSize(size: int) set subtitle font size .. py:method:: setAnimationDuration(duration: int) set animation duration in milliseconds .. py:method:: setCompacted(isCompacted: bool) set whether the widget is compacted .. py:method:: paintEvent(e) .. py:method:: textOpacity() .. py:method:: subtitleColor() .. py:class:: NavigationPanel(parent=None, isMinimalEnabled=False) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Navigation panel .. py:attribute:: displayModeChanged .. py:attribute:: indicator .. 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 :value: False .. py:method:: isIndicatorAnimationEnabled() .. py:method:: setIndicatorAnimationEnabled(isEnabled: bool) .. py:method:: isUpdateIndicatorPosOnCollapseFinished() .. py:method:: setUpdateIndicatorPosOnCollapseFinished(update: bool) .. 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:: addItemHeader(text: str, position=NavigationItemPosition.TOP) add item header Parameters ---------- text: str header text position: NavigationItemPosition where to add the header Returns ------- NavigationItemHeader created header widget .. py:method:: insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP) insert item header Parameters ---------- index: int insert position text: str header text position: NavigationItemPosition where to add the header Returns ------- NavigationItemHeader created header widget .. 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:: currentItem() .. py:method:: isCollapsed() .. 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:: addItemHeader(text: str, position=NavigationItemPosition.TOP) add item header for grouping navigation items Parameters ---------- text: str header text to display position: NavigationItemPosition where the header is added Returns ------- NavigationItemHeader created header widget .. py:method:: insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP) insert item header for grouping navigation items Parameters ---------- index: int insert position text: str header text to display position: NavigationItemPosition where the header is added Returns ------- NavigationItemHeader created header widget .. py:method:: addUserCard(routeKey: str, avatar: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIconBase] = None, title: str = '', subtitle: str = '', onClick=None, position=NavigationItemPosition.TOP, aboveMenuButton: bool = False) add user card to navigation panel Parameters ---------- routeKey: str the unique name of user card avatar: str | QIcon | FluentIconBase avatar image or icon title: str user name or title text subtitle: str subtitle text (e.g., email, status) onClick: callable the slot connected to card clicked signal position: NavigationItemPosition where the card is added aboveMenuButton: bool whether to place the card above the menu button (expand/collapse button) Returns ------- NavigationUserCard created user card widget .. 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:: isIndicatorAnimationEnabled() .. py:method:: setIndicatorAnimationEnabled(isEnabled: bool) set whether the indicator sliding animation is enabled .. py:method:: isUpdateIndicatorPosOnCollapseFinished() .. py:method:: setUpdateIndicatorPosOnCollapseFinished(update: bool) set whether to update indicator position when collapese finished .. 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:attribute:: lightSelectedColor .. py:attribute:: darkSelectedColor .. py:method:: setSelectedColor(light, dark) .. py:method:: selectedIcon() .. py:method:: setSelectedIcon(icon: Union[str, PyQt5.QtGui.QIcon, qfluentwidgets.common.icon.FluentIcon]) .. py:method:: setSelectedTextVisible(isVisible) .. py:method:: indicatorRect() get the indicator geometry .. 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:: indicator .. py:attribute:: lightSelectedColor .. py:attribute:: darkSelectedColor .. 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:: currentItem() .. 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:: isSelectedTextVisible() .. py:method:: setSelectedColor(light, dark) set the selected color of all items .. py:method:: buttons() .. py:method:: isIndicatorAnimationEnabled() .. py:method:: setIndicatorAnimationEnabled(isEnabled: bool) .. py:class:: Pivot(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Pivot .. py:attribute:: currentItemChanged .. py:attribute:: items :type: Dict[str, PivotItem] .. py:attribute:: lightIndicatorColor .. py:attribute:: darkIndicatorColor .. 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:: setIndicatorLength(len: int) .. py:method:: indicatorLength() .. 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:: setIndicatorColor(light, dark) .. py:method:: widget(routeKey: str) .. py:method:: resizeEvent(e) -> None .. py:method:: currentIndicatorGeometry() .. 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:attribute:: slideAni .. 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:method:: currentIndicatorGeometry() .. 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:: isRestEnabled() .. py:method:: setResetEnabled(isEnabled: bool) set the visibility of reset button .. 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:method:: reset() Reset date .. 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 :value: True .. 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:: lightSelectedBackgroundColor .. py:attribute:: darkSelectedBackgroundColor .. py:attribute:: hBoxLayout .. py:method:: setSelectedBackgroundColor(light, dark) set the background color of selected row .. 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:method:: setScrollButtonRepeatEnabled(isEnabled: bool) set whether to enable scroll button auto repeat .. py:method:: reset() .. py:method:: isRestEnabled() .. py:method:: setResetEnabled(isEnabled: bool) set the visibility of reset button .. py:class:: PickerPanel(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` picker panel .. py:attribute:: confirmed .. py:attribute:: resetted .. 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:: resetButton .. py:attribute:: cancelButton .. py:attribute:: hBoxLayout .. py:attribute:: listLayout .. py:attribute:: buttonLayout .. py:attribute:: vBoxLayout .. py:attribute:: scrollButtonRepeatEnabled :value: True .. py:method:: setShadowEffect(blurRadius=30, offset=(0, 8), color=QColor(0, 0, 0, 30)) add shadow to dialog .. py:method:: setResetEnabled(isEnabled: bool) set the visibility of reset button .. py:method:: setScrollButtonRepeatEnabled(isEnabled: bool) set whether to enable scroll button auto repeat .. py:method:: setSelectedBackgroundColor(light, dark) .. py:method:: isResetEnabled() .. 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: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