QgsTabWidget class
The QgsTabWidget class is the same as the QTabWidget but with additional methods to temporarily hide/show tabs.
Contents
Constructors, destructors, conversion operators
- QgsTabWidget(QWidget* parent = nullptr)
- Create a new QgsTabWidget with the optionally provided parent.
Public functions
- void hideTab(QWidget* tab)
- Hides the tab with the given widget.
- auto realTabIndex(QWidget* widget) -> int
- Returns the index of the tab with the given widget.
- void setTabVisible(QWidget* tab, bool visible)
- Control the visibility for the tab with the given widget.
- void showTab(QWidget* tab)
- Shows the tab with the given widget.
- void tabInserted(int index) override
- Is called internally whenever a new tab has been inserted.
- void tabRemoved(int index) override
- Is called internally whenever a tab has been removed.
Function documentation
QgsTabWidget:: QgsTabWidget(QWidget* parent = nullptr)
Create a new QgsTabWidget with the optionally provided parent.
void QgsTabWidget:: hideTab(QWidget* tab)
Hides the tab with the given widget.
int QgsTabWidget:: realTabIndex(QWidget* widget)
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.
void QgsTabWidget:: setTabVisible(QWidget* tab,
bool visible)
Control the visibility for the tab with the given widget.
void QgsTabWidget:: showTab(QWidget* tab)
Shows the tab with the given widget.
void QgsTabWidget:: tabInserted(int index) override
Is called internally whenever a new tab has been inserted.
Is used to keep track of currently available and visible tabs.
void QgsTabWidget:: tabRemoved(int index) override
Is called internally whenever a tab has been removed.
Is used to keep track of currently available and visible tabs.