Class: QgsTabWidget

class qgis.gui.QgsTabWidget(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QTabWidget

Create a new QgsTabWidget with the optionally provided parent.

New in version 3.0.

The QgsTabWidget class is the same as the QTabWidget but with additional methods to temporarily hide/show tabs.

New in version 3.0.

Parameters

parent

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
hideTab(self, tab: QWidget)

Hides the tab with the given widget

New in version 3.0.

Parameters

tab (QWidget) –

initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
realTabIndex(self, widget: QWidget) → int

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.

New in version 3.0.

Parameters

widget (QWidget) –

Return type

int

receivers()
resizeEvent()
sender()
senderSignalIndex()
setTabBar()
setTabVisible(self, tab: QWidget, visible: bool)

Control the visibility for the tab with the given widget.

New in version 3.0.

Parameters
  • tab (QWidget) –

  • visible (bool) –

sharedPainter()
showEvent()
showTab(self, tab: QWidget)

Shows the tab with the given widget

New in version 3.0.

Parameters

tab (QWidget) –

tabInserted(self, index: int)

Is called internally whenever a new tab has been inserted.

Is used to keep track of currently available and visible tabs.

New in version 3.0.

Parameters

index (int) –

tabRemoved(self, index: int)

Is called internally whenever a tab has been removed.

Is used to keep track of currently available and visible tabs.

New in version 3.0.

Parameters

index (int) –

tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()