Class: QgsTabWidget¶
The QgsTabWidget
class is the same as the QTabWidget but
with additional methods to temporarily hide/show tabs.
Class Hierarchy¶
Base classes¶
Methods
Hides the tab with the given widget |
|
Returns the index of the tab with the given widget. |
|
Sets the optional custom labelStyle for the tab identified by tabIndex. |
|
Control the visibility for the tab with the given widget. |
|
Shows the tab with the given widget |
|
Is called internally whenever a new tab has been inserted. |
|
Is called internally whenever a tab has been removed. |
- 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
labelStyle
for 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])