Class: QgsTabWidget¶
A QTabWidget with additional methods to temporarily hide/show tabs.
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsTabWidget[source]¶
Bases:
QTabWidget- __init__(parent: QWidget | None = None)
Create a new QgsTabWidget with the optionally provided parent.
- Parameters:
parent (Optional[QWidget] = None)
- hideTab(self, tab: QWidget | None)[source]¶
Hides the tab with the given widget
- Parameters:
tab (Optional[QWidget])
- realTabIndex(self, widget: QWidget | None) int[source]¶
Returns the index of the tab with the given widget. This index is not the same as the one provided to insertTab and removeTab since these methods are not aware of hidden tabs.
- Parameters:
widget (Optional[QWidget])
- Return type:
int
- setTabStyle(self, tabIndex: int, labelStyle: QgsAttributeEditorElement.LabelStyle)[source]¶
Sets the optional custom
labelStylefor the tab identified bytabIndex.Added in version 3.26.
- Parameters:
tabIndex (int)
labelStyle (QgsAttributeEditorElement.LabelStyle)
- setTabVisible(self, tab: QWidget | None, visible: bool)[source]¶
Control the visibility for the tab with the given widget.
- Parameters:
tab (Optional[QWidget])
visible (bool)
- showTab(self, tab: QWidget | None)[source]¶
Shows the tab with the given widget
- Parameters:
tab (Optional[QWidget])