pivot

Module Contents

PivotItem

Pivot item

Pivot

Pivot

class PivotItem(parent: PyQt5.QtWidgets.QWidget = None)

Bases: qfluentwidgets.components.widgets.button.PushButton

Pivot item

itemClicked
setSelected(isSelected: bool)
class Pivot(parent=None)

Bases: PyQt5.QtWidgets.QWidget

Pivot

currentItemChanged
items: Dict[str, PivotItem]
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

removeWidget(routeKey: str)

remove widget

Parameters

routeKey: str

the unique name of item

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)