navigation¶
Package Contents¶
Navigation widget |
|
Navigation push button |
|
Navigation Separator |
|
Navigation tool button |
|
Navigation tree widget |
|
Navigation tree widget base class |
|
Avatar widget |
|
Navigation item header for grouping items |
|
Navigation user card widget |
|
Navigation panel |
|
Navigation item position |
|
Navigation display mode |
|
Navigation interface |
|
Navigation bar push button |
|
Pivot |
|
Pivot item |
|
Segmented item |
|
Segmented widget |
|
Pivot item |
|
Segmented tool widget |
|
Transparent background tool button |
|
Segmented toggle tool widget |
|
Breadcrumb bar |
|
Breadcrumb item |
- class NavigationWidget(isSelectable: bool, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation widget
- clicked¶
- selectedChanged¶
- EXPAND_WIDTH = 312¶
- isCompacted = True¶
- isSelected = False¶
- isPressed = False¶
- isEnter = False¶
- isAboutSelected = False¶
- isSelectable¶
- treeParent = None¶
- nodeDepth = 0¶
- lightTextColor¶
- darkTextColor¶
- lightIndicatorColor¶
- darkIndicatorColor¶
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- click()¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- setSelected(isSelected: bool)¶
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
- textColor()¶
- setLightTextColor(color)¶
set the text color in light theme mode
- setDarkTextColor(color)¶
set the text color in dark theme mode
- setTextColor(light, dark)¶
set the text color in light/dark theme mode
- setAboutSelected(selected: bool)¶
- indicatorRect()¶
get the indicator geometry
- setIndicatorColor(light, dark)¶
- class NavigationPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)¶
Bases:
NavigationWidgetNavigation push button
- text()¶
- setText(text: str)¶
- icon()¶
- setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- paintEvent(e)¶
- class NavigationSeparator(parent=None)¶
Bases:
NavigationWidgetNavigation Separator
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- paintEvent(e)¶
- class NavigationToolButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, parent=None)¶
Bases:
NavigationPushButtonNavigation tool button
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- class NavigationTreeWidget(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)¶
Bases:
NavigationTreeWidgetBaseNavigation tree widget
- expanded¶
- treeChildren: List[NavigationTreeWidget] = []¶
- isExpanded = False¶
- itemWidget¶
- vBoxLayout¶
- expandAni¶
- text()¶
- icon()¶
- setText(text)¶
- setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- textColor()¶
- setLightTextColor(color)¶
set the text color in light theme mode
- setDarkTextColor(color)¶
set the text color in dark theme mode
- setTextColor(light, dark)¶
set the text color in light/dark theme mode
- setIndicatorColor(light, dark)¶
set the indicator color in light/dark theme mode
- setFont(font: PyQt5.QtGui.QFont)¶
- clone()¶
- suitableWidth()¶
- childItems() → list¶
return child items
- setExpanded(isExpanded: bool, ani=False)¶
set the expanded status
- isRoot()¶
is root node
- isLeaf()¶
is leaf node
- setSelected(isSelected: bool)¶
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
- mouseReleaseEvent(e)¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- setAboutSelected(selected: bool)¶
- setRememberExpandState(remember: bool)¶
set whether to remember expand state
- saveExpandState()¶
save current expand state
- restoreExpandState(ani=True)¶
restore saved expand state
- class NavigationTreeWidgetBase(isSelectable: bool, parent=None)¶
Bases:
NavigationWidgetNavigation tree widget base class
- abstract insertChild(index: int, child: NavigationWidget)¶
insert child
Parameters¶
- child: NavigationTreeWidgetBase
child item
- abstract removeChild(child: NavigationWidget)¶
remove child
Parameters¶
- child: NavigationTreeWidgetBase
child item
- isRoot()¶
is root node
- isLeaf()¶
is leaf node
- abstract setExpanded(isExpanded: bool)¶
set the expanded status
Parameters¶
- isExpanded: bool
whether to expand node
- abstract childItems() → list¶
return child items
- abstract setRememberExpandState(remember: bool)¶
set whether to remember expand state
- abstract saveExpandState()¶
save current expand state
- abstract restoreExpandState(ani=True)¶
restore saved expand state
- class NavigationAvatarWidget(name: str, avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, parent=None)¶
Bases:
NavigationWidgetAvatar widget
- name¶
- avatar¶
- setName(name: str)¶
- setAvatar(avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage)¶
- paintEvent(e)¶
- class NavigationItemHeader(text: str, parent=None)¶
Bases:
NavigationWidgetNavigation item header for grouping items
- lightTextColor¶
- darkTextColor¶
- heightAni¶
- text()¶
- setText(text: str)¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- paintEvent(e)¶
- class NavigationUserCard(parent=None)¶
Bases:
NavigationAvatarWidgetNavigation user card widget
- setAvatarIcon(icon: qfluentwidgets.common.icon.FluentIcon)¶
set avatar icon when no image is set
- setAvatarBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)¶
set avatar background color in light/dark theme mode
- title()¶
get user card title
- setTitle(title: str)¶
set user card title
- subtitle()¶
get user card subtitle
- setSubtitle(subtitle: str)¶
set user card subtitle
- setTitleFontSize(size: int)¶
set title font size
- setSubtitleFontSize(size: int)¶
set subtitle font size
- setAnimationDuration(duration: int)¶
set animation duration in milliseconds
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- paintEvent(e)¶
- textOpacity()¶
- subtitleColor()¶
- class NavigationPanel(parent=None, isMinimalEnabled=False)¶
Bases:
PyQt5.QtWidgets.QFrameNavigation panel
- displayModeChanged¶
- indicator¶
- acrylicBrush¶
- scrollArea¶
- scrollWidget¶
- menuButton¶
- returnButton¶
- vBoxLayout¶
- topLayout¶
- bottomLayout¶
- scrollLayout¶
- items: Dict[str, NavigationItem]¶
- history¶
- expandAni¶
- expandWidth = 322¶
- minimumExpandWidth = 1008¶
- isMinimalEnabled = False¶
- isIndicatorAnimationEnabled()¶
- setIndicatorAnimationEnabled(isEnabled: bool)¶
- isUpdateIndicatorPosOnCollapseFinished()¶
- setUpdateIndicatorPosOnCollapseFinished(update: bool)¶
- widget(routeKey: str)¶
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
add navigation item
Parameters¶
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- selectable: bool
whether the item is selectable
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent widget should be NavigationTreeWidget
- addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
add custom widget
Parameters¶
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey=None)¶
insert navigation tree item
Parameters¶
- index: int
the insert position of parent widget
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- selectable: bool
whether the item is selectable
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
insert custom widget
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- addSeparator(position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- position: NavigationPostion
where to add the separator
- insertSeparator(index: int, position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- index: int
insert position
- position: NavigationPostion
where to add the separator
- addItemHeader(text: str, position=NavigationItemPosition.TOP)¶
add item header
Parameters¶
- text: str
header text
- position: NavigationItemPosition
where to add the header
Returns¶
- NavigationItemHeader
created header widget
- insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP)¶
insert item header
Parameters¶
- index: int
insert position
- text: str
header text
- position: NavigationItemPosition
where to add the header
Returns¶
- NavigationItemHeader
created header widget
- setMenuButtonVisible(isVisible: bool)¶
set whether the menu button is visible
- setReturnButtonVisible(isVisible: bool)¶
set whether the return button is visible
- setCollapsible(on: bool)¶
- setExpandWidth(width: int)¶
set the maximum width
- setMinimumExpandWidth(width: int)¶
Set the minimum window width that allows panel to be expanded
- setAcrylicEnabled(isEnabled: bool)¶
- isAcrylicEnabled()¶
whether the acrylic effect is enabled
- expand(useAni=True)¶
expand navigation panel
- collapse()¶
collapse navigation panel
- toggle()¶
toggle navigation panel
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- currentItem()¶
- isCollapsed()¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- layoutMinHeight()¶
- paintEvent(e)¶
- class NavigationItemPosition¶
Bases:
enum.EnumNavigation item position
- TOP = 0¶
- SCROLL = 1¶
- BOTTOM = 2¶
- class NavigationDisplayMode¶
Bases:
enum.EnumNavigation display mode
- MINIMAL = 0¶
- COMPACT = 1¶
- EXPAND = 2¶
- MENU = 3¶
- class NavigationInterface(parent=None, showMenuButton=True, showReturnButton=False, collapsible=True)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation interface
- displayModeChanged¶
- panel¶
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) → qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget¶
add navigation item
Parameters¶
- routKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- selectable: bool
whether the item is selectable
- position: NavigationItemPosition
where the button is added
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidgetBase
- addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
add custom widget
Parameters¶
- routKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the widget is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidgetBase
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None) → qfluentwidgets.components.navigation.navigation_widget.NavigationTreeWidget¶
insert navigation item
Parameters¶
- index: int
insert position
- routKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- selectable: bool
whether the item is selectable
- position: NavigationItemPosition
where the item is added
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidgetBase
- insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_panel.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
insert custom widget
Parameters¶
- index: int
insert position
- routKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the widget is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidgetBase
- addSeparator(position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- position: NavigationPostion
where to add the separator
- addItemHeader(text: str, position=NavigationItemPosition.TOP)¶
add item header for grouping navigation items
Parameters¶
- text: str
header text to display
- position: NavigationItemPosition
where the header is added
Returns¶
- NavigationItemHeader
created header widget
- insertItemHeader(index: int, text: str, position=NavigationItemPosition.TOP)¶
insert item header for grouping navigation items
Parameters¶
- index: int
insert position
- text: str
header text to display
- position: NavigationItemPosition
where the header is added
Returns¶
- NavigationItemHeader
created header widget
- addUserCard(routeKey: str, avatar: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase = None, title: str = '', subtitle: str = '', onClick=None, position=NavigationItemPosition.TOP, aboveMenuButton: bool = False)¶
add user card to navigation panel
Parameters¶
- routeKey: str
the unique name of user card
- avatar: str | QIcon | FluentIconBase
avatar image or icon
- title: str
user name or title text
- subtitle: str
subtitle text (e.g., email, status)
- onClick: callable
the slot connected to card clicked signal
- position: NavigationItemPosition
where the card is added
- aboveMenuButton: bool
whether to place the card above the menu button (expand/collapse button)
Returns¶
- NavigationUserCard
created user card widget
- insertSeparator(index: int, position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- index: int
insert position
- position: NavigationPostion
where to add the separator
- expand(useAni=True)¶
expand navigation panel
- toggle()¶
toggle navigation panel
- setExpandWidth(width: int)¶
set the maximum width
- setMinimumExpandWidth(width: int)¶
Set the minimum window width that allows panel to be expanded
- setMenuButtonVisible(isVisible: bool)¶
set whether the menu button is visible
- setReturnButtonVisible(isVisible: bool)¶
set whether the return button is visible
- setCollapsible(collapsible: bool)¶
- isAcrylicEnabled()¶
- setAcrylicEnabled(isEnabled: bool)¶
set whether the acrylic background effect is enabled
- isIndicatorAnimationEnabled()¶
- setIndicatorAnimationEnabled(isEnabled: bool)¶
set whether the indicator sliding animation is enabled
- isUpdateIndicatorPosOnCollapseFinished()¶
- setUpdateIndicatorPosOnCollapseFinished(update: bool)¶
set whether to update indicator position when collapese finished
- widget(routeKey: str)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- resizeEvent(e: PyQt5.QtGui.QResizeEvent)¶
- class NavigationBarPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, selectedIcon=None, parent=None)¶
Bases:
qfluentwidgets.components.navigation.navigation_widget.NavigationPushButtonNavigation bar push button
- iconAni¶
- lightSelectedColor¶
- darkSelectedColor¶
- setSelectedColor(light, dark)¶
- selectedIcon()¶
- setSelectedIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- setSelectedTextVisible(isVisible)¶
- indicatorRect()¶
get the indicator geometry
- paintEvent(e)¶
- class NavigationBar(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidget- indicator¶
- lightSelectedColor¶
- darkSelectedColor¶
- scrollArea¶
- scrollWidget¶
- vBoxLayout¶
- topLayout¶
- bottomLayout¶
- scrollLayout¶
- items: Dict[str, qfluentwidgets.components.navigation.navigation_widget.NavigationWidget]¶
- history¶
- widget(routeKey: str)¶
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)¶
add navigation item
Parameters¶
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- selectable: bool
whether the item is selectable
- selectedIcon: str | QIcon | FluentIconBase
the icon of navigation item in selected state
- position: NavigationItemPosition
where the button is added
- addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)¶
add custom widget
Parameters¶
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)¶
insert navigation tree item
Parameters¶
- index: int
the insert position of parent widget
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- selectable: bool
whether the item is selectable
- selectedIcon: str | QIcon | FluentIconBase
the icon of navigation item in selected state
- position: NavigationItemPosition
where the button is added
- insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)¶
insert custom widget
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- currentItem()¶
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- setFont(font: PyQt5.QtGui.QFont)¶
set the font of navigation item
- setSelectedTextVisible(isVisible: bool)¶
set whether the text is visible when button is selected
- isSelectedTextVisible()¶
- setSelectedColor(light, dark)¶
set the selected color of all items
- buttons()¶
- isIndicatorAnimationEnabled()¶
- setIndicatorAnimationEnabled(isEnabled: bool)¶
- class Pivot(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetPivot
- currentItemChanged¶
- lightIndicatorColor¶
- darkIndicatorColor¶
- hBoxLayout¶
- slideAni¶
- addItem(routeKey: str, text: str, onClick=None, icon=None)¶
add item
Parameters¶
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- addWidget(routeKey: str, widget: PivotItem, onClick=None)¶
add widget
Parameters¶
- routeKey: str
the unique name of item
- widget: PivotItem
navigation widget
- onClick: callable
the slot connected to item clicked signal
- insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- insertWidget(index: int, routeKey: str, widget: PivotItem, onClick=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- widget: PivotItem
navigation widget
- onClick: callable
the slot connected to item clicked signal
- clear()¶
clear all navigation items
- currentItem()¶
Returns the current selected item
- currentRouteKey()¶
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- showEvent(e)¶
- setIndicatorLength(len: int)¶
- indicatorLength()¶
- setItemFontSize(size: int)¶
set the pixel font size of items
- setItemText(routeKey: str, text: str)¶
set the text of item
- setIndicatorColor(light, dark)¶
- widget(routeKey: str)¶
- resizeEvent(e) → None¶
- currentIndicatorGeometry()¶
- paintEvent(e)¶
- class PivotItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.PushButtonPivot item
- itemClicked¶
- setSelected(isSelected: bool)¶
- class SegmentedItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.navigation.pivot.PivotItemSegmented item
- class SegmentedWidget(parent=None)¶
Bases:
qfluentwidgets.components.navigation.pivot.PivotSegmented widget
- slideAni¶
- insertItem(index: int, routeKey: str, text: str, onClick=None, icon=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- paintEvent(e)¶
- currentIndicatorGeometry()¶
- class SegmentedToolItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.ToolButtonPivot item
- itemClicked¶
- setSelected(isSelected: bool)¶
- class SegmentedToolWidget(parent=None)¶
Bases:
SegmentedWidgetSegmented tool widget
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, onClick=None)¶
add item
Parameters¶
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- onClick: callable
the slot connected to item clicked signal
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, onClick=None)¶
insert item
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- icon: str
the icon of navigation item
- class SegmentedToggleToolItem(parent: PyQt5.QtWidgets.QWidget = None)¶
Bases:
qfluentwidgets.components.widgets.button.TransparentToolButtonTransparent background tool button
Constructors¶
TransparentToolButton(parent: QWidget = None)
TransparentToolButton(icon: QIcon | str | FluentIconBase, parent: QWidget = None)
- itemClicked¶
- setSelected(isSelected: bool)¶
- class SegmentedToggleToolWidget(parent=None)¶
Bases:
SegmentedToolWidgetSegmented toggle tool widget
- paintEvent(e)¶
- class BreadcrumbBar(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetBreadcrumb bar
- currentItemChanged¶
- currentIndexChanged¶
- itemMap: Dict[BreadcrumbItem]¶
- items: List[BreadcrumbItem] = []¶
- hiddenItems: List[BreadcrumbItem] = []¶
- elideButton¶
- addItem(routeKey: str, text: str)¶
add item
Parameters¶
- routeKey: str
unique key of item
- text: str
the text of item
- setCurrentIndex(index: int)¶
- setCurrentItem(routeKey: str)¶
- setItemText(routeKey: str, text: str)¶
- item(routeKey: str) → BreadcrumbItem¶
- itemAt(index: int)¶
- currentIndex()¶
- currentItem() → BreadcrumbItem¶
- resizeEvent(e)¶
- clear()¶
clear all items
- popItem()¶
pop trailing item
- count()¶
Returns the number of items
- updateGeometry()¶
- isElideVisible()¶
- setFont(font: PyQt5.QtGui.QFont)¶
- getSpacing()¶
- setSpacing(spacing: int)¶
- spacing¶
- class BreadcrumbItem(routeKey: str, text: str, index: int, parent=None)¶
Bases:
BreadcrumbWidgetBreadcrumb item
- text¶
- routeKey¶
- isHover = False¶
- isPressed = False¶
- isSelected = False¶
- index¶
- spacing = 5¶
- setText(text: str)¶
- isRoot()¶
- setSelected(isSelected: bool)¶
- setFont(font: PyQt5.QtGui.QFont)¶
- setSpacing(spacing: int)¶
- paintEvent(e)¶