pyqtribbon.panel
Module Contents
Classes
Widget to display the title of a panel. |
|
Mode to find available space in a grid layout, ColumnWise or RowWise. |
|
Grid Layout Manager. |
|
Widget to display a panel item. |
|
Button to display the options of a panel. |
|
Panel in the ribbon category. |
Attributes
- class pyqtribbon.panel.RibbonPanelTitle[source]
Bases:
qtpy.QtWidgets.QLabelWidget to display the title of a panel.
- class pyqtribbon.panel.RibbonSpaceFindMode[source]
Bases:
enum.IntEnumMode to find available space in a grid layout, ColumnWise or RowWise.
- class pyqtribbon.panel.RibbonGridLayoutManager(rows: int)[source]
Bases:
objectGrid Layout Manager.
- request_cells(rowSpan: int = 1, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise)[source]
Request a number of available cells from the grid.
- Parameters:
rowSpan – The number of rows the cell should span.
colSpan – The number of columns the cell should span.
mode – The mode of the grid.
- Returns:
row, col, the row and column of the requested cell.
- class pyqtribbon.panel.RibbonPanelItemWidget(parent=None)[source]
Bases:
qtpy.QtWidgets.QFrameWidget to display a panel item.
- class pyqtribbon.panel.RibbonPanelOptionButton[source]
Bases:
qtpy.QtWidgets.QToolButtonButton to display the options of a panel.
- class pyqtribbon.panel.RibbonPanel(title: str = '', maxRows: int = 6, showPanelOptionButton=True, parent=None) RibbonPanel(parent=None)[source]
Bases:
qtpy.QtWidgets.QFramePanel in the ribbon category.
- _gridLayoutManager: RibbonGridLayoutManager[source]
- maximumRows() int[source]
Return the maximal number of rows in the panel.
- Returns:
The maximal number of rows in the panel.
- largeRows() int[source]
Return the number of span rows for large widgets.
- Returns:
The number of span rows for large widgets.
- mediumRows() int[source]
Return the number of span rows for medium widgets.
- Returns:
The number of span rows for medium widgets.
- smallRows() int[source]
Return the number of span rows for small widgets.
- Returns:
The number of span rows for small widgets.
- setMaximumRows(maxRows: int)[source]
Set the maximal number of rows in the panel.
- Parameters:
maxRows – The maximal number of rows in the panel.
- setLargeRows(rows: int)[source]
Set the number of span rows for large widgets.
- Parameters:
rows – The number of span rows for large widgets.
- setMediumRows(rows: int)[source]
Set the number of span rows for medium widgets.
- Parameters:
rows – The number of span rows for medium widgets.
- setSmallRows(rows: int)[source]
Set the number of span rows for small widgets.
- Parameters:
rows – The number of span rows for small widgets.
- defaultRowSpan(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle)[source]
Return the number of span rows for the given widget type.
- Parameters:
rowSpan – row span or type.
- Returns:
The number of span rows for the given widget type.
- panelOptionButton() RibbonPanelOptionButton[source]
Return the panel option button.
- Returns:
The panel option button.
- setPanelOptionToolTip(text: str)[source]
Set the tooltip of the panel option button.
- Parameters:
text – The tooltip text.
- addWidgetsBy(data: Dict[str, Dict]) Dict[str, qtpy.QtWidgets.QWidget][source]
Add widgets to the panel.
- Parameters:
data –
The data to add. The dict is of the form:
{ "widget-name": { "type": "Button", "arguments": { "key1": "value1", "key2": "value2" } }, }
Possible types are: Button, SmallButton, MediumButton, LargeButton, ToggleButton, SmallToggleButton, MediumToggleButton, LargeToggleButton, ComboBox, FontComboBox, LineEdit, TextEdit, PlainTextEdit, Label, ProgressBar, SpinBox, DoubleSpinBox, DataEdit, TimeEdit, DateTimeEdit, TableWidget, TreeWidget, ListWidget, CalendarWidget, Separator, HorizontalSeparator, VerticalSeparator, Gallery.
- Returns:
A dictionary of the added widgets.
- addWidget(widget: qtpy.QtWidgets.QWidget, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False)[source]
Add a widget to the panel.
- Parameters:
widget – The widget to add.
rowSpan – The number of rows the widget should span, 2: small, 3: medium, 6: large.
colSpan – The number of columns the widget should span.
mode – The mode to find spaces.
alignment – The alignment of the widget.
fixedHeight – 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.
- addSmallWidget(widget: qtpy.QtWidgets.QWidget, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False)[source]
Add a small widget to the panel.
- Parameters:
widget – The widget to add.
mode – The mode to find spaces.
alignment – The alignment of the widget.
fixedHeight – 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:
The widget that was added.
- addMediumWidget(widget: qtpy.QtWidgets.QWidget, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False)[source]
Add a medium widget to the panel.
- Parameters:
widget – The widget to add.
mode – The mode to find spaces.
alignment – The alignment of the widget.
fixedHeight – 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.
- addLargeWidget(widget: qtpy.QtWidgets.QWidget, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False)[source]
Add a large widget to the panel.
- Parameters:
widget – The widget to add.
mode – The mode to find spaces.
alignment – The alignment of the widget.
fixedHeight – 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.
- widget(index: int) qtpy.QtWidgets.QWidget[source]
Get the widget at the given index.
- Parameters:
index – The index of the widget, starting from 0.
- Returns:
The widget at the given index.
- widgets() List[qtpy.QtWidgets.QWidget][source]
Get all the widgets in the panel.
- Returns:
A list of all the widgets in the panel.
- addButton(text: str = None, icon: qtpy.QtGui.QIcon = None, style: pyqtribbon.toolbutton.RibbonButtonStyle = RibbonButtonStyle.Large, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
style – The style of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addSmallButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a small button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addMediumButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a medium button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addLargeButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a large button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, style: pyqtribbon.toolbutton.RibbonButtonStyle = RibbonButtonStyle.Large, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a toggle button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
style – The style of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addSmallToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a small toggle button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addMediumToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a medium toggle button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addLargeToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, showText: bool = True, colSpan: int = 1, slot=None, shortcut=None, tooltip=None, statusTip=None, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.toolbutton.RibbonToolButton[source]
Add a large toggle button to the panel.
- Parameters:
text – The text of the button.
icon – The icon of the button.
showText – Whether to show the text of the button.
colSpan – The number of columns the button should span.
slot – The slot to call when the button is clicked.
shortcut – The shortcut of the button.
tooltip – The tooltip of the button.
statusTip – The status tip of the button.
mode – The mode to find spaces.
alignment – The alignment of the button.
fixedHeight – 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:
The button that was added.
- addComboBox(items: List[str], rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QComboBox[source]
Add a combo box to the panel.
- Parameters:
items – The items of the combo box.
rowSpan – The number of rows the combo box should span.
colSpan – The number of columns the combo box should span.
mode – The mode to find spaces.
alignment – The alignment of the combo box.
fixedHeight – 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:
The combo box that was added.
- addFontComboBox(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QFontComboBox[source]
Add a font combo box to the panel.
- Parameters:
rowSpan – The number of rows the combo box should span.
colSpan – The number of columns the combo box should span.
mode – The mode to find spaces.
alignment – The alignment of the combo box.
fixedHeight – 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:
The combo box that was added.
- addLineEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QLineEdit[source]
Add a line edit to the panel.
- Parameters:
rowSpan – The number of rows the line edit should span.
colSpan – The number of columns the line edit should span.
mode – The mode to find spaces.
alignment – The alignment of the line edit.
fixedHeight – 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:
The line edit that was added.
- addTextEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QTextEdit[source]
Add a text edit to the panel.
- Parameters:
rowSpan – The number of rows the text edit should span.
colSpan – The number of columns the text edit should span.
mode – The mode to find spaces.
alignment – The alignment of the text edit.
fixedHeight – 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:
The text edit that was added.
- addPlainTextEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QPlainTextEdit[source]
Add a plain text edit to the panel.
- Parameters:
rowSpan – The number of rows the text edit should span.
colSpan – The number of columns the text edit should span.
mode – The mode to find spaces.
alignment – The alignment of the text edit.
fixedHeight – 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:
The text edit that was added.
- addLabel(text: str, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QLabel[source]
Add a label to the panel.
- Parameters:
text – The text of the label.
rowSpan – The number of rows the label should span.
colSpan – The number of columns the label should span.
mode – The mode to find spaces.
alignment – The alignment of the label.
fixedHeight – 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:
The label that was added.
- addProgressBar(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QProgressBar[source]
Add a progress bar to the panel.
- Parameters:
rowSpan – The number of rows the progress bar should span.
colSpan – The number of columns the progress bar should span.
mode – The mode to find spaces.
alignment – The alignment of the progress bar.
fixedHeight – 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:
The progress bar that was added.
- addSlider(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QSlider[source]
Add a slider to the panel.
- Parameters:
rowSpan – The number of rows the slider should span.
colSpan – The number of columns the slider should span.
mode – The mode to find spaces.
alignment – The alignment of the slider.
fixedHeight – 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:
The slider that was added.
- addSpinBox(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QSpinBox[source]
Add a spin box to the panel.
- Parameters:
rowSpan – The number of rows the spin box should span.
colSpan – The number of columns the spin box should span.
mode – The mode to find spaces.
alignment – The alignment of the spin box.
fixedHeight – 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:
The spin box that was added.
- addDoubleSpinBox(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QDoubleSpinBox[source]
Add a double spin box to the panel.
- Parameters:
rowSpan – The number of rows the double spin box should span.
colSpan – The number of columns the double spin box should span.
mode – The mode to find spaces.
alignment – The alignment of the double spin box.
fixedHeight – 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:
The double spin box that was added.
- addDateEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QDateEdit[source]
Add a date edit to the panel.
- Parameters:
rowSpan – The number of rows the date edit should span.
colSpan – The number of columns the date edit should span.
mode – The mode to find spaces.
alignment – The alignment of the date edit.
fixedHeight – 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:
The date edit that was added.
- addTimeEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QTimeEdit[source]
Add a time edit to the panel.
- Parameters:
rowSpan – The number of rows the time edit should span.
colSpan – The number of columns the time edit should span.
mode – The mode to find spaces.
alignment – The alignment of the time edit.
fixedHeight – 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:
The time edit that was added.
- addDateTimeEdit(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QDateTimeEdit[source]
Add a date time edit to the panel.
- Parameters:
rowSpan – The number of rows the date time edit should span.
colSpan – The number of columns the date time edit should span.
mode – The mode to find spaces.
alignment – The alignment of the date time edit.
fixedHeight – 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:
The date time edit that was added.
- addTableWidget(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QTableWidget[source]
Add a table widget to the panel.
- Parameters:
rowSpan – The number of rows the table widget should span.
colSpan – The number of columns the table widget should span.
mode – The mode to find spaces.
alignment – The alignment of the table widget.
fixedHeight – 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:
The table widget that was added.
- addTreeWidget(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QTreeWidget[source]
Add a tree widget to the panel.
- Parameters:
rowSpan – The number of rows the tree widget should span.
colSpan – The number of columns the tree widget should span.
mode – The mode to find spaces.
alignment – The alignment of the tree widget.
fixedHeight – 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:
The tree widget that was added.
- addListWidget(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QListWidget[source]
Add a list widget to the panel.
- Parameters:
rowSpan – The number of rows the list widget should span.
colSpan – The number of columns the list widget should span.
mode – The mode to find spaces.
alignment – The alignment of the list widget.
fixedHeight – 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:
The list widget that was added.
- addCalendarWidget(rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) qtpy.QtWidgets.QCalendarWidget[source]
Add a calendar widget to the panel.
- Parameters:
rowSpan – The number of rows the calendar widget should span.
colSpan – The number of columns the calendar widget should span.
mode – The mode to find spaces.
alignment – The alignment of the calendar widget.
fixedHeight – 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:
The calendar widget that was added.
- addSeparator(orientation=QtCore.Qt.Vertical, width=6, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.separator.RibbonHorizontalSeparator | pyqtribbon.separator.RibbonVerticalSeparator[source]
Add a separator to the panel.
- Parameters:
orientation – The orientation of the separator.
width – The width of the separator.
rowSpan – The number of rows the separator spans.
colSpan – The number of columns the separator spans.
mode – The mode to find spaces.
alignment – The alignment of the separator.
fixedHeight – 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:
The separator.
- addHorizontalSeparator(width=6, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Small, colSpan: int = 2, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.separator.RibbonHorizontalSeparator[source]
Add a horizontal separator to the panel.
- Parameters:
width – The width of the separator.
rowSpan – The number of rows the separator spans.
colSpan – The number of columns the separator spans.
mode – The mode to find spaces.
alignment – The alignment of the separator.
fixedHeight – 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:
The separator.
- addVerticalSeparator(width=6, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.separator.RibbonVerticalSeparator[source]
Add a vertical separator to the panel.
- Parameters:
width – The width of the separator.
rowSpan – The number of rows the separator spans.
colSpan – The number of columns the separator spans.
mode – The mode to find spaces.
alignment – The alignment of the separator.
fixedHeight – 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:
The separator.
- addGallery(minimumWidth=800, popupHideOnClick=False, rowSpan: int | pyqtribbon.toolbutton.RibbonButtonStyle = Large, colSpan: int = 1, mode=RibbonSpaceFindMode.ColumnWise, alignment=QtCore.Qt.AlignCenter, fixedHeight: bool | float = False) pyqtribbon.gallery.RibbonGallery[source]
Add a gallery to the panel.
- Parameters:
minimumWidth – The minimum width of the gallery.
popupHideOnClick – Whether the gallery popup should be hidden when a user clicks on it.
rowSpan – The number of rows the gallery spans.
colSpan – The number of columns the gallery spans.
mode – The mode of the gallery.
alignment – The alignment of the gallery.
fixedHeight – 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:
The gallery.