pyqtribbon.gallery module
- class pyqtribbon.gallery.RibbonGallery(minimumWidth=800, popupHideOnClick=False, parent=None)[source]
- class pyqtribbon.gallery.RibbonGallery(parent=None)
Bases:
QFrameA widget that displays a gallery of buttons.
Create a gallery.
- Parameters:
minimumWidth – minimum width of the gallery
popupHideOnClick – hide on click flag
parent – parent widget
- addButton(text: str | None = None, icon: QIcon | None = None, slot=None, shortcut=None, tooltip=None, statusTip=None, checkable=False) Tuple[RibbonToolButton, RibbonToolButton][source]
Add a button to the gallery
- Parameters:
text – text of the button
icon – icon of the button
slot – slot to call when the button is clicked
shortcut – shortcut of the button
tooltip – tooltip of the button
statusTip – status tip of the button
checkable – checkable flag of the button.
- Returns:
the button and the popup button added
- addToggleButton(text: str | None = None, icon: QIcon | None = None, slot=None, shortcut=None, tooltip=None, statusTip=None) Tuple[RibbonToolButton, RibbonToolButton][source]
Add a toggle button to the gallery
- Parameters:
text – text of the button
icon – icon of the button
slot – slot to call when the button is clicked
shortcut – shortcut of the button
tooltip – tooltip of the button
statusTip – status tip of the button.
- Returns:
the button and the popup button added
- popupMenu() RibbonPermanentMenu[source]
Return the popup menu.
- resizeEvent(a0: QResizeEvent) None[source]
Resize the gallery.
- setPopupHideOnClick(popupHideOnClick: bool)[source]
Set the hide on click flag
- Parameters:
popupHideOnClick – hide on click flag
- class pyqtribbon.gallery.RibbonGalleryButton[source]
Bases:
QToolButtonGallery button.
- class pyqtribbon.gallery.RibbonGalleryListWidget(parent=None)[source]
Bases:
QListWidgetGallery list widget.
- resizeEvent(e: QResizeEvent) None[source]
Resize the list widget.
- class pyqtribbon.gallery.RibbonGalleryPopupListWidget(parent=None)[source]
Bases:
RibbonGalleryListWidgetGallery popup list widget.