pyqtribbon.gallery

Module Contents

Classes

RibbonPopupWidget

The popup widget for the gallery widget.

RibbonGalleryListWidget

Gallery list widget.

RibbonGalleryButton

Gallery button.

RibbonGalleryPopupListWidget

Gallery popup list widget.

RibbonGallery

A widget that displays a gallery of buttons.

class pyqtribbon.gallery.RibbonPopupWidget[source]

Bases: qtpy.QtWidgets.QFrame

The popup widget for the gallery widget.

class pyqtribbon.gallery.RibbonGalleryListWidget(parent=None)[source]

Bases: qtpy.QtWidgets.QListWidget

Gallery list widget.

resizeEvent(e: qtpy.QtGui.QResizeEvent) None[source]

Resize the list widget.

scrollToNextRow() None[source]

Scroll to the next row.

scrollToPreviousRow() None[source]

Scroll to the previous row.

class pyqtribbon.gallery.RibbonGalleryButton[source]

Bases: qtpy.QtWidgets.QToolButton

Gallery button.

class pyqtribbon.gallery.RibbonGalleryPopupListWidget(parent=None)[source]

Bases: RibbonGalleryListWidget

Gallery popup list widget.

class pyqtribbon.gallery.RibbonGallery(minimumWidth=800, popupHideOnClick=False, parent=None)           RibbonGallery(parent=None)[source]

Bases: qtpy.QtWidgets.QFrame

A widget that displays a gallery of buttons.

resizeEvent(a0: qtpy.QtGui.QResizeEvent) None[source]

Resize the gallery.

popupMenu() pyqtribbon.menu.RibbonPermanentMenu[source]

Return the popup menu.

showPopup()[source]

Show the popup window

hidePopupWidget()[source]

Hide the popup window

popupWindowSize()[source]

Return the size of the popup window

Returns:

size of the popup window

setPopupWindowSize(size: qtpy.QtCore.QSize)[source]

Set the size of the popup window

Parameters:

size – size of the popup window

setSelectedButton()[source]

Set the selected button

setPopupHideOnClick(popupHideOnClick: bool)[source]

Set the hide on click flag

Parameters:

popupHideOnClick – hide on click flag

addButton(text: str = None, icon: qtpy.QtGui.QIcon = None, slot=None, shortcut=None, tooltip=None, statusTip=None, checkable=False) pyqtribbon.toolbutton.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 added

addToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, slot=None, shortcut=None, tooltip=None, statusTip=None) pyqtribbon.toolbutton.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 added