pyqtribbon.titlewidget

Module Contents

Classes

RibbonApplicationButton

Application button in the ribbon bar.

RibbonTitleLabel

Title label in the ribbon bar.

RibbonTitleWidget

The title widget of the ribbon.

class pyqtribbon.titlewidget.RibbonApplicationButton[source]

Bases: qtpy.QtWidgets.QToolButton

Application button in the ribbon bar.

addFileMenu() pyqtribbon.menu.RibbonMenu[source]

Add a new ribbon menu to the application button.

Returns:

The new ribbon menu.

class pyqtribbon.titlewidget.RibbonTitleLabel[source]

Bases: qtpy.QtWidgets.QLabel

Title label in the ribbon bar.

class pyqtribbon.titlewidget.RibbonTitleWidget(title='PyQtRibbon', parent=None)           RibbonTitleWidget(parent=None)[source]

Bases: qtpy.QtWidgets.QFrame

The title widget of the ribbon.

applicationButton() RibbonApplicationButton[source]

Return the application button.

setApplicationIcon(icon: qtpy.QtGui.QIcon)[source]

Set the application icon.

Parameters:

icon – The icon to set.

addTitleWidget(widget: qtpy.QtWidgets.QWidget)[source]

Add a widget to the title layout.

Parameters:

widget – The widget to add.

insertTitleWidget(index: int, widget: qtpy.QtWidgets.QWidget)[source]

Insert a widget to the title layout.

Parameters:
  • index – The index to insert the widget.

  • widget – The widget to insert.

removeTitleWidget(widget: qtpy.QtWidgets.QWidget)[source]

Remove a widget from the title layout.

Parameters:

widget – The widget to remove.

tabBar() pyqtribbon.tabbar.RibbonTabBar[source]

Return the tab bar of the ribbon.

Returns:

The tab bar of the ribbon.

quickAccessToolBar() qtpy.QtWidgets.QToolBar[source]

Return the quick access toolbar of the ribbon.

Returns:

The quick access toolbar of the ribbon.

quickAccessButtons() List[qtpy.QtWidgets.QToolButton][source]

Return the quick access buttons of the ribbon.

Returns:

The quick access buttons of the ribbon.

addQuickAccessButton(button: qtpy.QtWidgets.QToolButton)[source]

Add a widget to the quick access bar.

Parameters:

button – The button to add.

setQuickAccessButtonHeight(height: int = 30)[source]

Set the height of the quick access buttons.

Parameters:

height – The height to set.

title() str[source]

Return the title of the ribbon.

Returns:

The title of the ribbon.

setTitle(title: str)[source]

Set the title of the ribbon.

Parameters:

title – The title to set.

rightToolBar() qtpy.QtWidgets.QToolBar[source]

Return the right toolbar of the ribbon.

Returns:

The right toolbar of the ribbon.

addRightToolButton(button: qtpy.QtWidgets.QToolButton)[source]

Add a widget to the right button bar.

Parameters:

button – The button to add.

setRightToolBarHeight(height: int = 24)[source]

Set the height of the right buttons.

Parameters:

height – The height to set.

helpRibbonButton() qtpy.QtWidgets.QToolButton[source]

Return the help ribbon button.

Returns:

The help ribbon button.

setHelpButtonIcon(icon: qtpy.QtGui.QIcon)[source]

Set the icon of the help button.

Parameters:

icon – The icon to set.

removeHelpButton()[source]

Remove the help button from the ribbon.

setCollapseButtonIcon(icon: qtpy.QtGui.QIcon)[source]

Set the icon of the min button.

Parameters:

icon – The icon to set.

removeCollapseButton()[source]

Remove the min button from the ribbon.

collapseRibbonButton() qtpy.QtWidgets.QToolButton[source]

Return the collapse ribbon button.

Returns:

The collapse ribbon button.