pyqtribbon.tabbar

Module Contents

Classes

RibbonTabBar

The TabBar for the title widget.

class pyqtribbon.tabbar.RibbonTabBar(parent=None)[source]

Bases: qtpy.QtWidgets.QTabBar

The TabBar for the title widget.

indexOf(tabName: str) int[source]

Return the index of the tab with the given name.

Parameters:

tabName – The name of the tab.

Returns:

The index of the tab.

tabTitles() List[str][source]

Return the titles of all tabs.

Returns:

The titles of all tabs.

addTab(text: str, color: qtpy.QtGui.QColor = None, *args, **kwargs) int[source]

Add a new tab to the tab bar.

Parameters:
  • text – The text of the tab.

  • color – The color of the tab.

Returns:

The index of the tab.

addAssociatedTabs(name: str, texts: List[str], color: qtpy.QtGui.QColor) List[int][source]

Add associated multiple tabs which have the same color to the tab bar.

Parameters:
  • name – The name of the context category.

  • texts – The texts of the tabs.

  • color – The color of the tabs.

Returns:

The indices of the tabs.

removeAssociatedTabs(titles: List[str]) None[source]

Remove tabs with the given titles.

Parameters:

titles – The titles of the tabs to remove.

currentTabColor() qtpy.QtGui.QColor[source]

Current tab color

Returns:

Current tab color

paintEvent(a0: qtpy.QtGui.QPaintEvent) None[source]

Paint the tab bar.