navigation_interface¶
Module Contents¶
Navigation interface |
- class NavigationInterface(parent=None, showMenuButton=True, showReturnButton=False, collapsible=True)¶
Bases:
PyQt5.QtWidgets.QWidget
Navigation interface
- displayModeChanged¶
- 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
- 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
- widget(routeKey: str)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- resizeEvent(e: PyQt5.QtGui.QResizeEvent)¶