### Basic Ribbon Bar Example Source: https://pyqribbon.readthedocs.io/en/stable/user.html A complete example demonstrating the instantiation and display of a RibbonBar within a QMainWindow. Requires QApplication setup. ```python import sys from qtpy import QtGui, QtWidgets from pyqtribbon import RibbonBar from pyqtribbon.screenshotwindow import RibbonScreenShotWindow if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) app.setFont(QtGui.QFont("Times New Roman", 8)) window = RibbonScreenShotWindow("ribbonbar.png") # Ribbon bar ribbonbar = RibbonBar() window.setMenuBar(ribbonbar) # Show the window window.resize(1000, 250) window.show() sys.exit(app.exec_()) ``` -------------------------------- ### Customize Ribbon Bar Example Source: https://pyqribbon.readthedocs.io/en/stable/user.html Demonstrates customization of a RibbonBar, including setting the title, adding quick access buttons, and adding right toolbar buttons. Requires QApplication setup. ```python import sys from qtpy import QtGui from qtpy.QtWidgets import QApplication, QToolButton from pyqtribbon import RibbonBar from pyqtribbon.screenshotwindow import RibbonScreenShotWindow if __name__ == "__main__": app = QApplication(sys.argv) app.setFont(QtGui.QFont("Times New Roman", 8)) window = RibbonScreenShotWindow("ribbonbar-customize.png") # Ribbon bar ribbonbar = RibbonBar() window.setMenuBar(ribbonbar) # Title of the ribbon ribbonbar.setTitle("This is my custom title") # Quick Access Bar qbutton = QToolButton() qbutton.setText("Quick Button") ribbonbar.addQuickAccessButton(qbutton) # Right toolbar rbutton = QToolButton() rbutton.setText("Right Button") ribbonbar.addRightToolButton(rbutton) # Show the window window.resize(1000, 250) window.show() sys.exit(app.exec_()) ``` -------------------------------- ### Setup Ribbon Bar and Categories Source: https://pyqribbon.readthedocs.io/en/stable/user.html This example demonstrates how to initialize a ribbon bar, add different types of categories (normal and context), and populate them with panels and buttons. It also shows how to set the current category and add categories using a dictionary. ```python import sys from qtpy import QtGui from qtpy.QtGui import QIcon from qtpy.QtWidgets import QApplication from pyqtribbon import RibbonBar, RibbonCategoryStyle from pyqtribbon.screenshotwindow import RibbonScreenShotWindow if __name__ == "__main__": app = QApplication(sys.argv) app.setFont(QtGui.QFont("Times New Roman", 8)) window = RibbonScreenShotWindow("category.png") # Ribbon bar ribbonbar = RibbonBar() window.setMenuBar(ribbonbar) # Categories category1 = ribbonbar.addCategory("Category 1") panel1 = category1.addPanel("Panel 1") panel1.addLargeButton("Large Button 1", QIcon("python.png")) category2 = ribbonbar.addContextCategory("Category 2") panel12 = category2.addPanel("Panel 2") panel12.addLargeButton("Large Button 2", QIcon("python.png")) categories = ribbonbar.addCategoriesBy( { "Category 6": { "style": RibbonCategoryStyle.Normal, "panels": { "Panel 1": { "showPanelOptionButton": True, "widgets": { "Button 1": { "type": "Button", "arguments": { "icon": QIcon("python.png"), "text": "Button", "tooltip": "This is a tooltip", }, }, }, }, }, } } ) ribbonbar.setCurrentCategory(categories["Category 6"]) # Show the window window.resize(1000, 250) window.show() sys.exit(app.exec_()) ``` -------------------------------- ### Install PyQtRibbon from Source Source: https://pyqribbon.readthedocs.io/en/stable/_sources/getting-started.rst.txt Use this command to install PyQtRibbon directly from its main branch on GitHub. This is useful for development or to get the latest unreleased features. ```sh pip install git+https://github.com/haiiliin/pyqtribbon.git@main ``` -------------------------------- ### RibbonBar General Setups Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Provides methods for general ribbon bar setup, including style, height, and visibility. ```APIDOC ## RibbonBar General Setups ### Description Methods for general ribbon bar setup, including style, height, and visibility. ### Methods - `setRibbonStyle()` - `ribbonHeight()` - `setRibbonHeight()` - `showRibbon()` - `hideRibbon()` - `ribbonVisible()` - `setRibbonVisible()` ``` -------------------------------- ### Complete PyQt Ribbon Example Source: https://pyqribbon.readthedocs.io/en/stable/user.html This code demonstrates how to create a full PyQt application with a RibbonBar, including adding categories, panels, and various button sizes. Ensure you have PyQt5 and pyqtribbon installed. ```python import sys from PyQt5.QtCore import Qt from PyQt5.QtGui import QFont, QIcon from PyQt5.QtWidgets import QApplication, QLabel, QVBoxLayout, QWidget from pyqtribbon import RibbonBar from pyqtribbon.screenshotwindow import RibbonScreenShotWindow from pyqtribbon.utils import DataFile if __name__ == "__main__": app = QApplication(sys.argv) app.setFont(QFont("Times New Roman", 8)) # Central widget window = RibbonScreenShotWindow("tutorial-ribbonbar.png") window.setWindowIcon(QIcon(DataFile("icons/python.png"))) centralWidget = QWidget() window.setCentralWidget(centralWidget) layout = QVBoxLayout(centralWidget) # Ribbon bar ribbonbar = RibbonBar() window.setMenuBar(ribbonbar) category = ribbonbar.addCategory("Category 1") panel = category.addPanel("Panel 1") panel.addLargeButton("A Large Button", QIcon(DataFile("icons/python.png"))) panel.addMediumButton("A Medium Button", QIcon(DataFile("icons/python.png"))) panel.addMediumButton("A Medium Button", QIcon(DataFile("icons/python.png"))) panel.addSmallButton("A Small Button", QIcon(DataFile("icons/python.png"))) panel.addSmallButton("A Small Button", QIcon(DataFile("icons/python.png"))) panel.addSmallButton("A Small Button", QIcon(DataFile("icons/python.png"))) # Display a label in the main window label = QLabel("Ribbon Test Window") label.setFont(QFont("Arial", 20)) label.setAlignment(Qt.AlignCenter) # Add the ribbon bar and label to the layout layout.addWidget(label, 1) # Show the window window.resize(1800, 350) # type: ignore window.show() sys.exit(app.exec_()) ``` -------------------------------- ### Complete Ribbon Bar Example Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt A comprehensive example demonstrating the creation and usage of a full ribbon bar interface with PyQRTibbon. This includes setting up the main window and adding various components. ```python from pyqribbon import RibbonBar, RibbonPanel, RibbonColorButton, RibbonSeparator app = QApplication(sys.argv) window = QMainWindow() window.setWindowTitle("Ribbon Bar Tutorial") ribbon = RibbonBar(window) # First panel panel1 = RibbonPanel("Home") # Add widgets to panel1 button1 = RibbonColorButton("Color") button1.addOption("Red", QColor(255, 0, 0)) button1.addOption("Green", QColor(0, 255, 0)) button1.addOption("Blue", QColor(0, 0, 255)) panel1.addWidget(button1) panel1.addSeparator() # Second panel panel2 = RibbonPanel("Insert") # Add widgets to panel2 button2 = RibbonColorButton("Shape") button2.addOption("Square", QColor(255, 255, 0)) button2.addOption("Circle", QColor(0, 255, 255)) panel2.addWidget(button2) panel2.addSeparator() panel2.addHorizontalSeparator() # Add panels to ribbon ribbon.addPanel(panel1) ribbon.addPanel(panel2) window.setMenuWidget(ribbon) window.showMaximized() sys.exit(app.exec_()) ``` -------------------------------- ### Example Category Management Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt This example demonstrates how to manage categories within a ribbon bar. It requires a separate file '_examples/category.py' for the full code. ```python from pyqtribbon import RibbonBar, RibbonCategory window = QtWidgets.QMainWindow() rubbon = RibbonBar() window.setMenuBar(ribbon) category = RibbonCategory("Example Category") rubbon.addCategory(category) ``` -------------------------------- ### Install PyQtRibbon from PyPI Source: https://pyqribbon.readthedocs.io/en/stable/_sources/getting-started.rst.txt Use this command to install the latest stable version of PyQtRibbon from the Python Package Index. ```sh pip install pyqtribbon ``` -------------------------------- ### RibbonPanel Title Label Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for setting and getting the title label of a ribbon panel. ```APIDOC ## RibbonPanel Title Label Setup ### Description Methods for setting and getting the title label of a ribbon panel. ### Methods - `title()` - `setTitle()` ``` -------------------------------- ### RibbonBar Application Button Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for setting up the application button and file menu in the ribbon bar. ```APIDOC ## RibbonBar Application Button Setup ### Description Methods for setting up the application button and file menu in the ribbon bar. ### Methods - `applicationOptionButton()` - `setApplicationIcon()` - `addFileMenu()` ``` -------------------------------- ### RibbonBar Quick Access Bar Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for setting up the quick access toolbar, including adding buttons and setting their height. ```APIDOC ## RibbonBar Quick Access Bar Setup ### Description Methods for setting up the quick access toolbar, including adding buttons and setting their height. ### Methods - `quickAccessToolBar()` - `addQuickAccessButton()` - `setQuickAccessButtonHeight()` ``` -------------------------------- ### RibbonCategory Style Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for setting the visual style of a ribbon category. ```APIDOC ## RibbonCategory Style Setup ### Description Methods for setting the visual style of a ribbon category. ### Methods - `categoryStyle()` - `setCategoryStyle()` ``` -------------------------------- ### Instantiate a Ribbon Bar Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Use the RibbonBar class and set it as the menu bar for a QMainWindow. This is the initial setup for a ribbon interface. ```python from pyqtribbon import RibbonBar window = QtWidgets.QMainWindow() rubbon = RibbonBar() window.setMenuBar(ribbon) ``` -------------------------------- ### RibbonBar Right Tool Bar Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for setting up the right toolbar, including adding buttons, setting heights, and configuring help/collapse buttons. ```APIDOC ## RibbonBar Right Tool Bar Setup ### Description Methods for setting up the right toolbar, including adding buttons, setting heights, and configuring help/collapse buttons. ### Methods - `rightToolBar()` - `addRightToolButton()` - `setRightToolBarHeight()` - `setHelpButtonIcon()` - `removeHelpButton()` - `helpButtonClicked()` - `collapseRibbonButton()` - `setCollapseButtonIcon()` - `removeCollapseButton()` ``` -------------------------------- ### RibbonPanel Option Button Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for configuring the option button of a ribbon panel, including setting tooltips and handling clicks. ```APIDOC ## RibbonPanel Option Button Setup ### Description Methods for configuring the option button of a ribbon panel, including setting tooltips and handling clicks. ### Methods - `panelOptionButton()` - `setPanelOptionToolTip()` - `panelOptionClicked()` ``` -------------------------------- ### RibbonBar Title Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Methods for managing the title of the ribbon bar, including adding and removing title widgets. ```APIDOC ## RibbonBar Title Setup ### Description Methods for managing the title of the ribbon bar, including adding and removing title widgets. ### Methods - `title()` - `setTitle()` - `addTitleWidget()` - `insertTitleWidget()` - `removeTitleWidget()` ``` -------------------------------- ### Get All Panels Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Retrieve a dictionary containing all panels currently within the category. ```python panels() → Dict[str, RibbonPanel] ``` -------------------------------- ### Add Widgets to PyQtRibbon Panels Source: https://pyqribbon.readthedocs.io/en/stable/user.html This example demonstrates how to create a ribbon bar and populate its panels with various widgets and buttons. It shows adding small, medium, and large buttons, toggle buttons, separators, and a gallery with a custom popup menu. The code also illustrates how to add a custom widget to the gallery's popup menu using a form layout. ```Python import sys from qtpy import QtGui from qtpy.QtCore import Qt from qtpy.QtGui import QIcon from qtpy.QtWidgets import QApplication, QLabel, QLineEdit, QMenu, QToolButton from pyqtribbon import RibbonBar from pyqtribbon.screenshotwindow import RibbonScreenShotWindow if __name__ == "__main__": app = QApplication(sys.argv) app.setFont(QtGui.QFont("Times New Roman", 8)) window = RibbonScreenShotWindow("panel.png") # Ribbon bar ribbonbar = RibbonBar() window.setMenuBar(ribbonbar) category1 = ribbonbar.addCategory("Category 1") panel = category1.addPanel("Panel 1", showPanelOptionButton=False) panel.addSmallButton("Button 1", icon=QIcon("python.png")) panel.addSmallButton("Button 2", icon=QIcon("python.png")) panel.addSmallButton("Button 3", icon=QIcon("python.png")) panel.addMediumToggleButton("Show/Hide Category 2", icon=QIcon("python.png")) panel.addVerticalSeparator() panel.addMediumToggleButton("Show/Hide Category 3", icon=QIcon("python.png")) panel.addMediumToggleButton("Show/Hide Category 4/5", icon=QIcon("python.png"), colSpan=2, alignment=Qt.AlignLeft) panel.addLargeButton("Button 4", icon=QIcon("python.png")) panel.addVerticalSeparator() panel.addMediumButton("Button 5", icon=QIcon("python.png")) panel.addMediumButton("Button 6", icon=QIcon("python.png")) button = panel.addLargeButton("Button 7", icon=QIcon("python.png")) menu = QMenu() menu.addAction(QIcon("python.png"), "Action 1") menu.addAction(QIcon("python.png"), "Action 2") menu.addAction(QIcon("python.png"), "Action 3") button.setMenu(menu) button.setPopupMode(QToolButton.InstantPopup) panel.addWidget(button, rowSpan=6) gallery = panel.addGallery(minimumWidth=500, popupHideOnClick=True) for i in range(100): gallery.addToggleButton(f"item {i+1}", QIcon("python.png")) popupMenu = gallery.popupMenu() submenu = popupMenu.addMenu(QIcon("python.png"), "Submenu") submenu.addAction(QIcon("python.png"), "Action 4") popupMenu.addAction(QIcon("python.png"), "Action 1") popupMenu.addAction(QIcon("python.png"), "Action 2") popupMenu.addSeparator() popupMenu.addWidget(QLabel("This is a custom widget")) formLayout = popupMenu.addFormLayoutWidget() formLayout.addRow(QLabel("Row 1"), QLineEdit()) # Show the window window.resize(1300, 250) window.show() sys.exit(app.exec_()) ``` -------------------------------- ### Instantiate a Ribbon Bar Source: https://pyqribbon.readthedocs.io/en/stable/user.html Use the setMenuBar method of QMainWindow to set the RibbonBar as the main menu bar. This is the basic setup for integrating the ribbon. ```python from pyqtribbon import RibbonBar window = QtWidgets.QMainWindow() rubbon = RibbonBar() window.setMenuBar(ribbon) ``` -------------------------------- ### Get Panel Widget by Index Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Retrieves a specific widget from the panel using its index. Indices are zero-based, starting from the first widget added. ```python widget(_index : int_) → QWidget ``` -------------------------------- ### RibbonBar Category Tab Bar Setup Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Provides access to the category tab bar of the ribbon bar. ```APIDOC ## RibbonBar Category Tab Bar Setup ### Description Provides access to the category tab bar of the ribbon bar. ### Method - `tabBar()` ``` -------------------------------- ### Get Collapse Ribbon Button Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Returns the QToolButton used to collapse or expand the ribbon. ```python collapseRibbonButton() → QToolButton ``` -------------------------------- ### Get a Specific Panel Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Access a specific panel within the category by its title. ```python panel(_title : str_) → RibbonPanel ``` -------------------------------- ### popupWindowSize Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Gets the size of the popup window for the ribbon gallery. This method is part of the RibbonGallery class. ```APIDOC ## popupWindowSize() ### Description Gets the size of the popup window for the ribbon gallery. ### Method (Implicitly called) ### Class pyqtribbon.gallery.RibbonGallery ``` -------------------------------- ### Get All Panel Widgets Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Returns a list containing all widgets currently present in the panel. This is useful for iterating over or inspecting all panel contents. ```python widgets() → List[QWidget] ``` -------------------------------- ### Instantiate a Ribbon Bar Source: https://pyqribbon.readthedocs.io/en/stable/_sources/user.rst.txt Demonstrates how to instantiate a RibbonBar and set it as the menu bar for a QMainWindow. ```APIDOC ## Instantiate a Ribbon Bar ### Description Instantiate a RibbonBar and set it as the menu bar for a QMainWindow. ### Method ```python from pyqtribbon import RibbonBar window = QtWidgets.QMainWindow() ribbon = RibbonBar() window.setMenuBar(ribbon) ``` ``` -------------------------------- ### Get Category Title Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Retrieve the title of the category. ```python title() → str ``` -------------------------------- ### Get Category by Name Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Retrieves a specific category from the ribbon using its name. ```python category(_name : str_) → RibbonCategory ``` -------------------------------- ### Get All Categories Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Returns a dictionary containing all categories currently present in the ribbon. ```python categories() → Dict[str, RibbonCategory] ``` -------------------------------- ### Initialize RibbonBar Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Create a new RibbonBar instance. You can specify a title, maximum rows, and a parent widget. ```python RibbonBar(_title : str = 'Ribbon Bar Title'_, _maxRows =6_, _parent =None_) ``` ```python RibbonBar(_parent =None_) ``` -------------------------------- ### Get RibbonCategory Style Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Retrieve the current button style applied to the category. ```python categoryStyle() → RibbonCategoryStyle ``` -------------------------------- ### ribbonHeight Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Gets the current height of the ribbon bar. This method is part of the RibbonBar class. ```APIDOC ## ribbonHeight() ### Description Gets the current height of the ribbon bar. ### Method (Implicitly called) ### Class pyqtribbon.ribbonbar.RibbonBar ``` -------------------------------- ### show_exception_box Static Method Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.logger.html The show_exception_box static method checks for a QApplication instance and displays a messagebox with the exception message. If a QApplication is not available, it logs an additional notice. ```APIDOC ## static def show_exception_box(log_msg) Checks if a QApplication instance is available and shows a messagebox with the exception message. If unavailable (non-console application), log an additional notice. ``` -------------------------------- ### rowHeight Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Gets the height of a row within a ribbon panel. This method is part of the RibbonPanel class. ```APIDOC ## rowHeight() ### Description Gets the height of a row within a ribbon panel. ### Method (Implicitly called) ### Class pyqtribbon.panel.RibbonPanel ``` -------------------------------- ### Take Widget from Category Layout Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Remove and return a QWidget from the category's layout. ```python takeWidget(_widget : QWidget_) → QWidget ``` -------------------------------- ### quickAccessButtons Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Retrieves a list of all quick access buttons added to the ribbon. ```APIDOC ## quickAccessButtons() → List[QToolButton] ### Description Return the quick access buttons of the ribbon. ### Returns The quick access buttons of the ribbon. ``` -------------------------------- ### Get Application Button Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Retrieves the ribbon's application button, typically used for file operations. ```python applicationOptionButton() → RibbonApplicationButton ``` -------------------------------- ### contextColors Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.constants.html A list of QColor objects representing context category colors. ```APIDOC ## Variable contextColors ### Description A list of context category colors. ### Type list[PyQt5.QtGui.QColor] ``` -------------------------------- ### RibbonBar Methods Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Provides access to various methods for interacting with and configuring the RibbonBar. ```APIDOC ## RibbonBar Methods ### cornerWidget Get or set the corner widget. ### currentCategory Return the current category. ### eventFilter Event filter for handling events. ### helpRibbonButton Return the help button of the ribbon. ### hideContextCategory Hide the given category or categories. ### hideRibbon Hide the ribbon. ### insertMenu Insert a menu. ### insertSeparator Insert a separator. ### insertTitleWidget Insert a widget to the title widget. ### isDefaultUp Check if the default is up. ### isNativeMenuBar Check if the native menu bar is used. ### minimumSizeHint Return the minimum size hint of the widget. ### quickAccessToolBar Return the quick access toolbar of the ribbon. ### removeCategories Remove a list of categories from the ribbon. ### removeCategory Remove a category from the ribbon. ### removeCollapseButton Remove the min button from the ribbon. ### removeHelpButton Remove the help button from the ribbon. ### removeTitleWidget Remove a widget from the title widget. ### ribbonHeight Get the total height of the ribbon. ### ribbonVisible Get the visibility of the ribbon. ### rightToolBar Return the right toolbar of the ribbon. ### setActiveAction Set the active action. ### setApplicationIcon Set the application icon. ### setAutoHideRibbon Set whether the ribbon bar is automatically hidden. ### setCollapseButtonIcon Set the icon of the min button. ### setCornerWidget Set the corner widget. ### setCurrentCategory Set the current category. ### setDefaultUp Set the default up state. ### setHelpButtonIcon Set the icon of the help button. ### setNativeMenuBar Set whether to use the native menu bar. ### setQuickAccessButtonHeight Set the height of the quick access buttons. ### setRibbonHeight Set the total height of the ribbon. ### setRibbonStyle Set the style of the ribbon. ### setRibbonVisible Set the visibility of the ribbon. ### setRightToolBarHeight Set the height of the right buttons. ### setTitle Set the title of the ribbon. ### setTitleWidgetHeight Set the height of the title widget. ### showCategoryByIndex Show category by tab index. ### showContextCategory Show the given category or categories. ``` -------------------------------- ### Adding Actions and Menus Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Methods for adding actions, menus, and separators to the ribbon bar. ```APIDOC ## addAction(_self_ , _action : QAction | None_) ## addAction(_self_ , _text : str | None_) → QAction | None ## addAction(_self_ , _text : str | None_, _slot : PYQT_SLOT_) → QAction | None ### Description Adds an action to the ribbon. Overloaded to accept a QAction, text, or text with a slot. ``` ```APIDOC ## addFileMenu() ### Description Adds a file menu to the ribbon. ### Returns RibbonMenu - The newly added file menu. ``` ```APIDOC ## addMenu(_self_ , _menu : QMenu | None_) ## addMenu(_self_ , _title : str | None_) → QMenu | None ## addMenu(_self_ , _icon : QIcon_, _title : str | None_) → QMenu | None ### Description Adds a menu to the ribbon. Overloaded to accept a QMenu, a title, or an icon and title. ``` ```APIDOC ## addSeparator(_self_) ### Description Adds a separator to the ribbon. ``` -------------------------------- ### Add Menu by Icon and Title Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Adds a new menu to the ribbon using both an icon and a title. ```python addMenu(_self_ , _icon : QIcon_, _title : str | None_) → QMenu | None ``` -------------------------------- ### Utilities Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Utility functions available in the PyQTRibbon library. ```APIDOC ## Utilities ### DataFile() Represents a data file utility. ``` -------------------------------- ### RibbonScreenShotWindow Class Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.screenshotwindow.html Initializes a window for taking screenshots. The window automatically closes shortly after being displayed. ```APIDOC ## class pyqtribbon.screenshotwindow.RibbonScreenShotWindow(_fileName : str = 'shot.jpg'_, _* args_, _** kwargs_) ### Description This class is just for taking a screenshot of the window, the window will be closed 0.1s after it is shown. ### Parameters #### Parameters - **fileName** (str) - The file name for the screenshot. ``` -------------------------------- ### Add Action by Text Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Adds a new action to the ribbon with just text, returning the created QAction. ```python addAction(_self_ , _text : str | None_) → QAction | None ``` -------------------------------- ### RibbonGallery Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing ribbon gallery widgets. ```APIDOC ## RibbonGallery Methods ### hidePopupWidget() Hides the popup widget associated with the gallery. ``` -------------------------------- ### Take a Panel Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Remove and return a panel from the category by its title. ```python takePanel(_title : str_) → RibbonPanel ``` -------------------------------- ### quickAccessToolBar Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Retrieves the toolbar that holds the quick access buttons. ```APIDOC ## quickAccessToolBar() → QToolBar ### Description Return the quick access toolbar of the ribbon. ### Returns The quick access toolbar of the ribbon. ``` -------------------------------- ### panelOptionClicked Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html A signal emitted when the panel option button is clicked. This is a PyQt signal. ```APIDOC ## panelOptionClicked ### Description Signal emitted when the panel option button is clicked. ### Parameters - **_bool_** - No description available. ``` -------------------------------- ### Add Quick Access Button Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Appends a QToolButton to the ribbon's quick access toolbar. ```python addQuickAccessButton(_button : QToolButton_) ``` -------------------------------- ### takeScreenShot Method Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.screenshotwindow.html Captures a screenshot of the current window. ```APIDOC ## takeScreenShot() ### Description Take a screenshot of the window. ``` -------------------------------- ### Add File Menu Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Adds a dedicated file menu to the ribbon interface. ```python addFileMenu() → RibbonMenu ``` -------------------------------- ### RibbonMenu Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing menu elements within the ribbon. ```APIDOC ## RibbonMenu Methods ### addFormLayoutWidget() Adds a widget with a form layout to the menu. ### addGridLayoutWidget() Adds a widget with a grid layout to the menu. ### addHorizontalLayoutWidget() Adds a widget with a horizontal layout to the menu. ### addLabel() Adds a label to the menu. ### addSpacing() Adds spacing to the menu. ### addVerticalLayoutWidget() Adds a widget with a vertical layout to the menu. ### addWidget() Adds a widget to the menu. ``` -------------------------------- ### widget Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Retrieves a widget from the panel at a specific index. ```APIDOC ## widget ### Description Get the widget at the given index. ### Parameters - **index** (int) - Required - The index of the widget, starting from 0. ### Returns - QWidget - The widget at the given index. ``` -------------------------------- ### Quick Access and Title Widgets Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Methods for adding custom widgets to the quick access toolbar and the title bar area. ```APIDOC ## addQuickAccessButton(_button : QToolButton_) ### Description Adds a button to the quick access bar. ### Parameters * **button** (QToolButton) - The button to add. ``` ```APIDOC ## addRightToolButton(_button : QToolButton_) ### Description Adds a widget to the right button bar. ### Parameters * **button** (QToolButton) - The button to add. ``` ```APIDOC ## addTitleWidget(_widget : QWidget_) ### Description Adds a widget to the title widget area. ### Parameters * **widget** (QWidget) - The widget to add. ``` -------------------------------- ### takeScreenShot Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Initiates the screenshot capture process. This method is part of the RibbonScreenShotWindow. ```APIDOC ## takeScreenShot() ### Description Initiates the process of taking a screenshot. ### Method `takeScreenShot()` ### Class pyqtribbon.screenshotwindow.RibbonScreenShotWindow ``` -------------------------------- ### DataFile Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.utils.html Returns the path to a data file within the pyqtribbon package. ```APIDOC ## DataFile ### Description Return the path to a data file. ### Parameters #### Path Parameters - **filename** (str) - Required - The filename of the data file. ### Returns - **str** - The path to the data file. ``` -------------------------------- ### RibbonBar Class Initialization Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Initializes a new RibbonBar instance. It can be created with a title, maximum rows, and a parent widget, or with just a parent widget. ```APIDOC ## RibbonBar(_title : str = 'Ribbon Bar Title'_, _maxRows =6_, _parent =None_) ## RibbonBar(_parent =None_) ### Description Creates a new ribbon bar. ### Parameters * **title** (str) - The title of the ribbon. * **maxRows** (int) - The maximum number of rows. * **parent** (QWidget) - The parent widget of the ribbon. ``` -------------------------------- ### Add Menu by Title Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Adds a new menu to the ribbon with a specified title. ```python addMenu(_self_ , _title : str | None_) → QMenu | None ``` -------------------------------- ### addQuickAccessButton Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Adds a widget to the quick access bar of the ribbon title. ```APIDOC ## addQuickAccessButton(_button : QToolButton_) ### Description Add a widget to the quick access bar. ### Parameters **button** – The button to add. ``` -------------------------------- ### RibbonGallery Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing gallery widgets within the ribbon. ```APIDOC ## RibbonGallery Methods ### addButton() Adds a button to the gallery. ### addToggleButton() Adds a toggle button to the gallery. ``` -------------------------------- ### Create a Panel Item Widget Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Initializes a widget designed to display a single panel item. It serves as a container for individual UI elements within a panel. ```python _class _pyqtribbon.panel.RibbonPanelItemWidget(_parent =None_) Bases: `QFrame` Widget to display a panel item. Create a new panel item. Parameters: **parent** – The parent widget. addWidget(_widget_) Add a widget to the panel item. Parameters: **widget** – The widget to add. ``` -------------------------------- ### setHelpButtonIcon Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Sets the icon for the help button. ```APIDOC ## setHelpButtonIcon(_icon : QIcon_) ### Description Set the icon of the help button. ### Parameters **icon** – The icon to set. ``` -------------------------------- ### addGallery Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a gallery widget to the ribbon panel. Allows configuration of minimum width and popup behavior. ```APIDOC ## addGallery ### Description Adds a gallery to the panel. ### Parameters * **minimumWidth** (int) - The minimum width of the gallery. * **popupHideOnClick** (bool) - Whether the gallery popup should be hidden when a user clicks on it. * **kwargs** - keyword arguments to control the properties of the widget on the ribbon bar. ### Returns RibbonGallery - The gallery widget. ``` -------------------------------- ### setTitle Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Sets the title text for the panel. ```APIDOC ## setTitle ### Description Set the title of the panel. ### Parameters - **title** (str) - Required - The title to set. ``` -------------------------------- ### helpButtonClicked Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html A signal emitted when the help button is clicked. ```APIDOC ## helpButtonClicked(_bool_) ### Description Signal, the help button was clicked. ``` -------------------------------- ### RibbonPanel Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for controlling the layout and appearance of ribbon panels. ```APIDOC ## RibbonPanel Methods ### defaultRowSpan() Gets the default row span for elements within the panel. ### largeRows() Configures the panel to use large rows. ### maximumRows() Gets the maximum number of rows allowed in the panel. ### mediumRows() Configures the panel to use medium rows. ``` -------------------------------- ### RibbonApplicationButton Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods related to the application button in the ribbon. ```APIDOC ## RibbonApplicationButton Methods ### addFileMenu() Adds a file menu associated with the application button. ``` -------------------------------- ### RibbonGallery.setPopupWindowSize Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.gallery.html Sets the size of the popup window for the gallery. ```APIDOC ## setPopupWindowSize(_size : QSize_) ### Description Set the size of the popup window ### Parameters * **size** (QSize) - size of the popup window ``` -------------------------------- ### addWidgetsBy Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds widgets to the panel based on a provided data dictionary. The dictionary specifies widget types, arguments, and keyword arguments for each widget to be added. ```APIDOC ## addWidgetsBy ### Description Adds widgets to the panel. The data dictionary defines the widgets to be added, including their type, arguments, and keyword arguments. ### Parameters - **data** (Dict[str, Dict]) - Required - A dictionary where keys are widget names and values are dictionaries containing widget configuration (type, args, kwargs). ### Returns - Dict[str, QWidget] - A dictionary of the added widgets. ``` -------------------------------- ### RibbonGallery.showPopup Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.gallery.html Displays the popup window for the gallery. ```APIDOC ## showPopup() ### Description Show the popup window ``` -------------------------------- ### showPopup Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Displays the popup window for a gallery. This method is part of the RibbonGallery. ```APIDOC ## showPopup() ### Description Displays the popup window associated with the gallery. ### Method `showPopup()` ### Class pyqtribbon.gallery.RibbonGallery ``` -------------------------------- ### RibbonPanelItemWidget Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing item widgets within ribbon panels. ```APIDOC ## RibbonPanelItemWidget Methods ### addWidget() Adds a widget to the panel item. ``` -------------------------------- ### addSmallButton Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a small button to the panel with customizable text, icon, visibility of text, slot, shortcut, tooltip, status tip, and checkable state. ```APIDOC ## addSmallButton ### Description Adds a small button to the panel. ### Method Signature addSmallButton(_text : str = None_, _icon : QIcon = None_, _showText : bool = True_, _slot : Callable = None_, _shortcut : Key | QKeySequence | QtCore.QKeyCombination | StandardKey | str | int = None_, _tooltip : str = None_, _statusTip : str = None_, _checkable : bool = False_, _*_ , _rowSpan : RibbonButtonStyle = RibbonButtonStyle.Small_, _** kwargs_) → RibbonToolButton ``` -------------------------------- ### setQuickAccessButtonHeight Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Sets the height for all quick access buttons. ```APIDOC ## setQuickAccessButtonHeight(_height : int_) ### Description Set the height of the quick access buttons. ### Parameters **height** – The height to set. ``` -------------------------------- ### Add Panels from Dictionary Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Efficiently add multiple panels to a category using a dictionary. The dictionary keys are panel titles, and values contain panel arguments, including widget configurations. ```python addPanelsBy(_data : Dict[str, Dict]_) → Dict[str, RibbonPanel] ``` -------------------------------- ### widgets Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Retrieves a list of all widgets currently present in the panel. ```APIDOC ## widgets ### Description Get all the widgets in the panel. ### Returns - List[QWidget] - A list of all the widgets in the panel. ``` -------------------------------- ### addLabel Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a QLabel to the ribbon panel with customizable properties. ```APIDOC ## addLabel ### Parameters * **args** * **cls** (class) - Defaults to PyQt5.QtWidgets.QLabel. * **initializer** (Callable) - Defaults to setText. * **rowSpan** (Union[int, RibbonButtonStyle]) - Defaults to RibbonButtonStyle.Small. * **colSpan** (int) - Defaults to 1. * **mode** (RibbonSpaceFindMode) - Defaults to RibbonSpaceFindMode.ColumnWise. * **alignment** (QtCore.Qt.AlignmentFlag) - Defaults to 132. * **fixedHeight** (Union[bool, float]) - Defaults to False. * **kwargs** - keyword arguments to control the properties of the widget on the ribbon bar. ### Returns QWidget ``` -------------------------------- ### addWidget Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a generic QWidget to the panel. Allows specifying row and column spans, spacing mode, alignment, and whether the height should be fixed. ```APIDOC ## addWidget ### Description Adds a widget to the panel. ### Parameters - **widget** (QWidget) - The widget to add. - **rowSpan** (int | RibbonButtonStyle) - The number of rows the widget should span, 2: small, 3: medium, 6: large. - **colSpan** (int) - The number of columns the widget should span. - **mode** (RibbonSpaceFindMode) - The mode to find spaces. - **alignment** (AlignmentFlag) - The alignment of the widget. - **fixedHeight** (bool | float) - Whether to fix the height of the widget, it can be a boolean, a percentage or a fixed height, when a boolean is given, the height is fixed to the maximum height allowed if the value is True, when a percentage is given (0 < percentage < 1) the height is calculated from the height of the maximum height allowed, depends on the number of rows to span. The minimum height is 40% of the maximum height allowed. ### Returns QWidget | Any - The added widget. ``` -------------------------------- ### RibbonCategoryLayoutWidget Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing layout widgets within ribbon categories. ```APIDOC ## RibbonCategoryLayoutWidget Methods ### addWidget() Adds a widget to the category layout. ### autoSetScrollButtonsVisible() Automatically sets the visibility of scroll buttons for the category layout. ``` -------------------------------- ### Logger Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for handling uncaught exceptions. ```APIDOC ## Logger Methods ### exception_hook() Sets or gets the hook for uncaught exceptions. ``` -------------------------------- ### addListWidget Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a QListWidget to the ribbon panel with customizable properties. ```APIDOC ## addListWidget ### Parameters * **args** * **cls** (class) - Defaults to PyQt5.QtWidgets.QListWidget. * **initializer** (Callable) - Defaults to None. * **rowSpan** (Union[int, RibbonButtonStyle]) - Defaults to RibbonButtonStyle.Large. * **colSpan** (int) - Defaults to 1. * **mode** (RibbonSpaceFindMode) - Defaults to RibbonSpaceFindMode.ColumnWise. * **alignment** (QtCore.Qt.AlignmentFlag) - Defaults to 132. * **fixedHeight** (Union[bool, float]) - Defaults to False. * **kwargs** - keyword arguments to control the properties of the widget on the ribbon bar. ### Returns QWidget ``` -------------------------------- ### Constants Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Enumerations and constants used within PyQTRibbon. ```APIDOC ## Constants ### RibbonSpaceFindMode.ColumnWise Constant for column-wise space finding. ### RibbonCategoryStyle.Context Constant representing the context style for categories. ### RibbonCategoryStyle.Normal Constant representing the normal style for categories. ### RibbonStyle.Debug Constant for debug ribbon style. ### RibbonStyle.Default Constant for default ribbon style. ### RibbonButtonStyle.Large Constant for large button style. ### RibbonButtonStyle.Medium Constant for medium button style. ### contextColors Attribute containing context-specific colors. ``` -------------------------------- ### showRibbon Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.ribbonbar.html Displays the ribbon bar interface to the user. ```APIDOC ## showRibbon() ### Description Show the ribbon. ### Method showRibbon ``` -------------------------------- ### sizeHint Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Provides a size hint for a ribbon separator. This method is part of the RibbonSeparator. ```APIDOC ## sizeHint() ### Description Returns a recommended size for the separator. ### Method `sizeHint()` ### Class pyqtribbon.separator.RibbonSeparator ``` -------------------------------- ### RibbonContextCategory Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing individual context categories. ```APIDOC ## RibbonContextCategory Methods ### categoryVisible() Checks the visibility of a specific context category. ``` -------------------------------- ### RibbonPanel Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing panels within ribbon categories. ```APIDOC ## RibbonPanel Methods ### addButton() Adds a button to the panel. ### addCalendarWidget() Adds a calendar widget to the panel. ### addCheckBox() Adds a checkbox to the panel. ### addComboBox() Adds a combo box to the panel. ### addDateEdit() Adds a date edit widget to the panel. ### addDateTimeEdit() Adds a date-time edit widget to the panel. ### addDoubleSpinBox() Adds a double spin box to the panel. ### addFontComboBox() Adds a font combo box to the panel. ### addGallery() Adds a gallery widget to the panel. ### addHorizontalSeparator() Adds a horizontal separator to the panel. ### addLabel() Adds a label to the panel. ### addLargeButton() Adds a large button to the panel. ### addLargeToggleButton() Adds a large toggle button to the panel. ### addLargeWidget() Adds a large widget to the panel. ### addLineEdit() Adds a line edit widget to the panel. ### addListWidget() Adds a list widget to the panel. ### addMediumButton() Adds a medium button to the panel. ### addMediumToggleButton() Adds a medium toggle button to the panel. ### addMediumWidget() Adds a medium widget to the panel. ### addPlainTextEdit() Adds a plain text edit widget to the panel. ### addProgressBar() Adds a progress bar to the panel. ### addSeparator() Adds a separator to the panel. ### addSlider() Adds a slider to the panel. ### addSmallButton() Adds a small button to the panel. ### addSmallToggleButton() Adds a small toggle button to the panel. ### addSmallWidget() Adds a small widget to the panel. ### addSpinBox() Adds a spin box to the panel. ### addTableWidget() Adds a table widget to the panel. ### addTextEdit() Adds a text edit widget to the panel. ### addTimeEdit() Adds a time edit widget to the panel. ### addToggleButton() Adds a toggle button to the panel. ### addTreeWidget() Adds a tree widget to the panel. ### addVerticalSeparator() Adds a vertical separator to the panel. ### addWidget() Adds a widget to the panel. ### addWidgetsBy() Adds widgets to the panel based on a provided criteria. ``` -------------------------------- ### widget Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Returns a specific widget from a ribbon panel. This method is part of the RibbonPanel. ```APIDOC ## widget() ### Description Returns a specific widget from the panel, likely by index or identifier. ### Method `widget()` ### Class pyqtribbon.panel.RibbonPanel ``` -------------------------------- ### RibbonGallery Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.gallery.html Represents a widget that displays a gallery of buttons. It can be initialized with a minimum width, a flag to hide the popup on click, and a parent widget. ```APIDOC ## class RibbonGallery(_minimumWidth =800_, _popupHideOnClick =False_, _parent =None_) ### Description A widget that displays a gallery of buttons. Create a gallery. ### Parameters * **minimumWidth** (int) - minimum width of the gallery * **popupHideOnClick** (bool) - hide on click flag * **parent** (QWidget) - parent widget ``` -------------------------------- ### RibbonGallery.popupWindowSize Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.gallery.html Returns the current size of the popup window. ```APIDOC ## popupWindowSize() → QSize ### Description Return the size of the popup window ### Returns QSize - size of the popup window ``` -------------------------------- ### addProgressBar Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Adds a QProgressBar to the ribbon panel with customizable properties. ```APIDOC ## addProgressBar ### Parameters * **args** * **cls** (class) - Defaults to PyQt5.QtWidgets.QProgressBar. * **initializer** (Callable) - Defaults to None. * **rowSpan** (Union[int, RibbonButtonStyle]) - Defaults to RibbonButtonStyle.Small. * **colSpan** (int) - Defaults to 1. * **mode** (RibbonSpaceFindMode) - Defaults to RibbonSpaceFindMode.ColumnWise. * **alignment** (QtCore.Qt.AlignmentFlag) - Defaults to 132. * **fixedHeight** (Union[bool, float]) - Defaults to False. * **kwargs** - keyword arguments to control the properties of the widget on the ribbon bar. ### Returns QWidget ``` -------------------------------- ### RibbonPermanentMenu Methods Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Methods for managing permanent menus within the ribbon interface. ```APIDOC ## RibbonPermanentMenu Methods ### actionAdded Attribute related to actions added to the menu. ### addAction() Adds an action to the permanent menu. ``` -------------------------------- ### helpRibbonButton Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Retrieves the help button from the ribbon title widget. ```APIDOC ## helpRibbonButton() → QToolButton ### Description Return the help ribbon button. ### Returns The help ribbon button. ``` -------------------------------- ### setTitle Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.titlewidget.html Sets the main title text for the ribbon. ```APIDOC ## setTitle(_title : str_) ### Description Set the title of the ribbon. ### Parameters **title** – The title to set. ``` -------------------------------- ### RibbonStyle Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.constants.html Enumeration for different ribbon styles, including Default and Debug. ```APIDOC ## Enum RibbonStyle ### Description An enumeration. ### Members - **Default** = 0 - **Debug** = 1 ``` -------------------------------- ### Create a RibbonCategory Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Instantiate a RibbonCategory to represent a tab in the ribbon interface. You can specify its title, style, color, and parent widget. ```python RibbonCategory(_title : str = ''_, _style : RibbonCategoryStyle = RibbonCategoryStyle.Normal_, _color : QColor = None_, _parent =None_) ``` ```python RibbonCategory(_parent =None_) ``` -------------------------------- ### RibbonPanelOptionButton Class Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.panel.html Represents a tool button specifically designed to display panel options. It inherits from QToolButton. ```python _class _pyqtribbon.panel.RibbonPanelOptionButton[source] Bases: `QToolButton` Button to display the options of a panel. ``` -------------------------------- ### Add Widget to Category Layout Source: https://pyqribbon.readthedocs.io/en/stable/apidoc/pyqtribbon.category.html Add a QWidget to the category's layout. This is used internally for arranging widgets. ```python addWidget(_widget : QWidget_) ``` -------------------------------- ### popupMenu Source: https://pyqribbon.readthedocs.io/en/stable/genindex.html Displays a popup menu for the ribbon gallery. This method is part of the RibbonGallery class. ```APIDOC ## popupMenu() ### Description Displays a popup menu for the ribbon gallery. ### Method (Implicitly called) ### Class pyqtribbon.gallery.RibbonGallery ```