widgets ======= .. py:module:: qfluentwidgets.components.widgets .. toctree:: :titlesonly: :maxdepth: 1 acrylic_label/index.rst button/index.rst card_widget/index.rst check_box/index.rst combo_box/index.rst command_bar/index.rst cycle_list_widget/index.rst flip_view/index.rst flyout/index.rst frameless_window/index.rst icon_widget/index.rst info_badge/index.rst info_bar/index.rst label/index.rst line_edit/index.rst list_view/index.rst menu/index.rst model_combo_box/index.rst pips_pager/index.rst progress_bar/index.rst progress_ring/index.rst scroll_area/index.rst scroll_bar/index.rst separator/index.rst slider/index.rst spin_box/index.rst stacked_widget/index.rst state_tool_tip/index.rst switch_button/index.rst tab_view/index.rst table_view/index.rst teaching_tip/index.rst tool_tip/index.rst tree_view/index.rst Package Contents ---------------- .. autoapisummary:: qfluentwidgets.components.widgets.DropDownPushButton qfluentwidgets.components.widgets.DropDownToolButton qfluentwidgets.components.widgets.PrimaryPushButton qfluentwidgets.components.widgets.PushButton qfluentwidgets.components.widgets.RadioButton qfluentwidgets.components.widgets.HyperlinkButton qfluentwidgets.components.widgets.ToolButton qfluentwidgets.components.widgets.TransparentToolButton qfluentwidgets.components.widgets.ToggleButton qfluentwidgets.components.widgets.SplitWidgetBase qfluentwidgets.components.widgets.SplitPushButton qfluentwidgets.components.widgets.SplitToolButton qfluentwidgets.components.widgets.PrimaryToolButton qfluentwidgets.components.widgets.PrimarySplitPushButton qfluentwidgets.components.widgets.PrimarySplitToolButton qfluentwidgets.components.widgets.PrimaryDropDownPushButton qfluentwidgets.components.widgets.PrimaryDropDownToolButton qfluentwidgets.components.widgets.ToggleToolButton qfluentwidgets.components.widgets.TransparentPushButton qfluentwidgets.components.widgets.TransparentTogglePushButton qfluentwidgets.components.widgets.TransparentToggleToolButton qfluentwidgets.components.widgets.TransparentDropDownPushButton qfluentwidgets.components.widgets.TransparentDropDownToolButton qfluentwidgets.components.widgets.PillPushButton qfluentwidgets.components.widgets.PillToolButton qfluentwidgets.components.widgets.CardWidget qfluentwidgets.components.widgets.ElevatedCardWidget qfluentwidgets.components.widgets.SimpleCardWidget qfluentwidgets.components.widgets.HeaderCardWidget qfluentwidgets.components.widgets.CardGroupWidget qfluentwidgets.components.widgets.GroupHeaderCardWidget qfluentwidgets.components.widgets.CheckBox qfluentwidgets.components.widgets.ComboBox qfluentwidgets.components.widgets.EditableComboBox qfluentwidgets.components.widgets.ModelComboBox qfluentwidgets.components.widgets.EditableModelComboBox qfluentwidgets.components.widgets.CommandBar qfluentwidgets.components.widgets.CommandButton qfluentwidgets.components.widgets.CommandBarView qfluentwidgets.components.widgets.FlipView qfluentwidgets.components.widgets.HorizontalFlipView qfluentwidgets.components.widgets.VerticalFlipView qfluentwidgets.components.widgets.FlipImageDelegate qfluentwidgets.components.widgets.LineEdit qfluentwidgets.components.widgets.TextEdit qfluentwidgets.components.widgets.PlainTextEdit qfluentwidgets.components.widgets.LineEditButton qfluentwidgets.components.widgets.SearchLineEdit qfluentwidgets.components.widgets.PasswordLineEdit qfluentwidgets.components.widgets.TextBrowser qfluentwidgets.components.widgets.IconWidget qfluentwidgets.components.widgets.PixmapLabel qfluentwidgets.components.widgets.CaptionLabel qfluentwidgets.components.widgets.StrongBodyLabel qfluentwidgets.components.widgets.BodyLabel qfluentwidgets.components.widgets.SubtitleLabel qfluentwidgets.components.widgets.TitleLabel qfluentwidgets.components.widgets.LargeTitleLabel qfluentwidgets.components.widgets.DisplayLabel qfluentwidgets.components.widgets.FluentLabelBase qfluentwidgets.components.widgets.ImageLabel qfluentwidgets.components.widgets.AvatarWidget qfluentwidgets.components.widgets.HyperlinkLabel qfluentwidgets.components.widgets.ListWidget qfluentwidgets.components.widgets.ListView qfluentwidgets.components.widgets.ListItemDelegate qfluentwidgets.components.widgets.DWMMenu qfluentwidgets.components.widgets.LineEditMenu qfluentwidgets.components.widgets.RoundMenu qfluentwidgets.components.widgets.MenuAnimationManager qfluentwidgets.components.widgets.MenuAnimationType qfluentwidgets.components.widgets.IndicatorMenuItemDelegate qfluentwidgets.components.widgets.MenuItemDelegate qfluentwidgets.components.widgets.ShortcutMenuItemDelegate qfluentwidgets.components.widgets.CheckableMenu qfluentwidgets.components.widgets.MenuIndicatorType qfluentwidgets.components.widgets.SystemTrayMenu qfluentwidgets.components.widgets.CheckableSystemTrayMenu qfluentwidgets.components.widgets.InfoBar qfluentwidgets.components.widgets.InfoBarIcon qfluentwidgets.components.widgets.InfoBarPosition qfluentwidgets.components.widgets.InfoBarManager qfluentwidgets.components.widgets.InfoBadge qfluentwidgets.components.widgets.InfoLevel qfluentwidgets.components.widgets.DotInfoBadge qfluentwidgets.components.widgets.IconInfoBadge qfluentwidgets.components.widgets.InfoBadgePosition qfluentwidgets.components.widgets.InfoBadgeManager qfluentwidgets.components.widgets.SingleDirectionScrollArea qfluentwidgets.components.widgets.SmoothMode qfluentwidgets.components.widgets.SmoothScrollArea qfluentwidgets.components.widgets.ScrollArea qfluentwidgets.components.widgets.Slider qfluentwidgets.components.widgets.HollowHandleStyle qfluentwidgets.components.widgets.ClickableSlider qfluentwidgets.components.widgets.SpinBox qfluentwidgets.components.widgets.DoubleSpinBox qfluentwidgets.components.widgets.DateEdit qfluentwidgets.components.widgets.DateTimeEdit qfluentwidgets.components.widgets.TimeEdit qfluentwidgets.components.widgets.CompactSpinBox qfluentwidgets.components.widgets.CompactDoubleSpinBox qfluentwidgets.components.widgets.CompactDateEdit qfluentwidgets.components.widgets.CompactDateTimeEdit qfluentwidgets.components.widgets.CompactTimeEdit qfluentwidgets.components.widgets.PopUpAniStackedWidget qfluentwidgets.components.widgets.OpacityAniStackedWidget qfluentwidgets.components.widgets.TransitionStackedWidget qfluentwidgets.components.widgets.EntranceTransitionStackedWidget qfluentwidgets.components.widgets.DrillInTransitionStackedWidget qfluentwidgets.components.widgets.StateToolTip qfluentwidgets.components.widgets.SwitchButton qfluentwidgets.components.widgets.IndicatorPosition qfluentwidgets.components.widgets.TableView qfluentwidgets.components.widgets.TableWidget qfluentwidgets.components.widgets.TableItemDelegate qfluentwidgets.components.widgets.ToolTip qfluentwidgets.components.widgets.ToolTipFilter qfluentwidgets.components.widgets.ToolTipPosition qfluentwidgets.components.widgets.TreeWidget qfluentwidgets.components.widgets.TreeView qfluentwidgets.components.widgets.TreeItemDelegate qfluentwidgets.components.widgets.CycleListWidget qfluentwidgets.components.widgets.IndeterminateProgressBar qfluentwidgets.components.widgets.ProgressBar qfluentwidgets.components.widgets.ProgressRing qfluentwidgets.components.widgets.IndeterminateProgressRing qfluentwidgets.components.widgets.ScrollBar qfluentwidgets.components.widgets.SmoothScrollBar qfluentwidgets.components.widgets.SmoothScrollDelegate qfluentwidgets.components.widgets.ScrollBarHandleDisplayMode qfluentwidgets.components.widgets.TeachingTip qfluentwidgets.components.widgets.TeachingTipTailPosition qfluentwidgets.components.widgets.TeachingTipView qfluentwidgets.components.widgets.PopupTeachingTip qfluentwidgets.components.widgets.FlyoutView qfluentwidgets.components.widgets.FlyoutViewBase qfluentwidgets.components.widgets.Flyout qfluentwidgets.components.widgets.FlyoutAnimationType qfluentwidgets.components.widgets.FlyoutAnimationManager qfluentwidgets.components.widgets.TabBar qfluentwidgets.components.widgets.TabItem qfluentwidgets.components.widgets.TabCloseButtonDisplayMode qfluentwidgets.components.widgets.TabWidget qfluentwidgets.components.widgets.PipsPager qfluentwidgets.components.widgets.VerticalPipsPager qfluentwidgets.components.widgets.HorizontalPipsPager qfluentwidgets.components.widgets.PipsScrollButtonDisplayMode qfluentwidgets.components.widgets.HorizontalSeparator qfluentwidgets.components.widgets.VerticalSeparator .. autoapisummary:: qfluentwidgets.components.widgets.TogglePushButton .. 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)