Skip to main content

class Tabs

Source

A value based tab set with native focus and arrow key navigation.

Inherits from QWidget

Functions​

addContent​

public QWidget & addContent(const QString & value)

Creates content owned by Tabs. It is deleted when its tab is removed.

orientation​

public Qt::Orientation orientation()

Source

listVariant​

public TabsListVariant listVariant()

Source

Tabs​

public Tabs(Qt::Orientation orientation, QWidget * parent)

setOrientation​

public void setOrientation(Qt::Orientation orientation)

setListVariant​

public void setListVariant(TabsListVariant variant)

addTab​

public QPushButton & addTab(const QString & value, const QString & label)

addContent​

public void addContent(const QString & value, QWidget & content)

The supplied content remains caller owned and is detached on removal.

removeTab​

public void removeTab(const QString & value)

currentValue​

public QString currentValue()

listVisible​

public bool listVisible()

Source

setCurrentValue​

public void setCurrentValue(const QString & value)

values​

public QStringList values()

setListVisible​

public void setListVisible(bool visible)

Whether the bar of tabs is shown.

An application whose navigation lives in a rail still needs a value based page switcher, and without a way to hide the bar the reader gets two sets of tabs saying the same thing in two places. Hiding it takes no room, so the pages grow into the space rather than collapsing.

list​

public QHBoxLayout & list()

currentChanged​

public void currentChanged(const QString & value)

eventFilter​

protected bool eventFilter(QObject * watched, QEvent * event)