pyqtribbon.titlewidget module
- class pyqtribbon.titlewidget.RibbonApplicationButton[source]
Bases:
QToolButtonApplication button in the ribbon bar.
- addFileMenu() RibbonMenu[source]
Add a new ribbon menu to the application button.
- Returns:
The new ribbon menu.
- class pyqtribbon.titlewidget.RibbonTitleWidget(title='PyQtRibbon', parent=None)[source]
- class pyqtribbon.titlewidget.RibbonTitleWidget(parent=None)
Bases:
QFrameThe title widget of the ribbon.
Initialize the ribbon title widget.
- Parameters:
title – The title of the ribbon.
parent – The parent widget.
- addQuickAccessButton(button: QToolButton)[source]
Add a widget to the quick access bar.
- Parameters:
button – The button to add.
- addRightToolButton(button: QToolButton)[source]
Add a widget to the right button bar.
- Parameters:
button – The button to add.
- addTitleWidget(widget: QWidget)[source]
Add a widget to the title layout.
- Parameters:
widget – The widget to add.
- applicationButton() RibbonApplicationButton[source]
Return the application button.
- collapseRibbonButton() QToolButton[source]
Return the collapse ribbon button.
- Returns:
The collapse ribbon button.
- helpRibbonButton() QToolButton[source]
Return the help ribbon button.
- Returns:
The help ribbon button.
- insertTitleWidget(index: int, widget: QWidget)[source]
Insert a widget to the title layout.
- Parameters:
index – The index to insert the widget.
widget – The widget to insert.
- mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
- mouseMoveEvent(self, a0: QMouseEvent | None)[source]
- mousePressEvent(self, a0: QMouseEvent | None)[source]
- quickAccessButtons() List[QToolButton][source]
Return the quick access buttons of the ribbon.
- Returns:
The quick access buttons of the ribbon.
- quickAccessToolBar() QToolBar[source]
Return the quick access toolbar of the ribbon.
- Returns:
The quick access toolbar of the ribbon.
- removeQuickAccessButton(button: QToolButton, action: QAction)[source]
Remove a widget from the quick access bar.
- Parameters:
button – The button to remove.
action – The widget action returned by the addQuickAccessButton method.
- removeRightToolButton(button: QToolButton, action: QAction)[source]
Remove a widget from the right button bar.
- Parameters:
button – The button to remove.
action – The widget action returned by the addRightToolButton method.
- removeTitleWidget(widget: QWidget)[source]
Remove a widget from the title layout.
- Parameters:
widget – The widget to remove.
- rightToolBar() QToolBar[source]
Return the right toolbar of the ribbon.
- Returns:
The right toolbar of the ribbon.
- setApplicationIcon(icon: QIcon)[source]
Set the application icon.
- Parameters:
icon – The icon to set.
- setCollapseButtonIcon(icon: QIcon)[source]
Set the icon of the min button.
- Parameters:
icon – The icon to set.
- setHelpButtonIcon(icon: QIcon)[source]
Set the icon of the help button.
- Parameters:
icon – The icon to set.
- setQuickAccessButtonHeight(height: int)[source]
Set the height of the quick access buttons.
- Parameters:
height – The height to set.
- setRightToolBarHeight(height: int)[source]
Set the height of the right buttons.
- Parameters:
height – The height to set.
- setTitleWidgetHeight(height: int)[source]
Set the height of the title widget.
- Parameters:
height – The height to set.
- tabBar() RibbonTabBar[source]
Return the tab bar of the ribbon.
- Returns:
The tab bar of the ribbon.