|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QStyleOptionTab Class Reference

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar. More...

    #include <QStyleOptionTab>

Part of the QtGui module.

Inherits QStyleOption.

- List of all members, including inherited members

### Public Types

- enum CornerWidget { NoCornerWidgets, LeftCornerWidget, RightCornerWidget }
- flags CornerWidgets
- enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected }
- enum TabPosition { Beginning, Middle, End, OnlyOneTab }

### Properties

- icon : const QIcon
- position : const TabPosition
- row : const int

- selectedPosition : const SelectedPosition
- shape : const QTabBar::Shape
- text : const QString

- 5 properties inherited from QStyleOption

### Public Functions

- QStyleOptionTab ()
- QStyleOptionTab ( const QStyleOptionTab & other )

- 2 public functions inherited from QStyleOption

## Detailed Description

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

The QStyleOptionTab class is used for drawing QTabBar and the pane for QTabWidget.

## Member Type Documentation

### enum QStyleOptionTab::CornerWidget
flags QStyleOptionTab::CornerWidgets

The `CornerWidgets` type stores an OR combination of `CornerWidget` values.

### enum QStyleOptionTab::SelectedPosition

Constant | Value | Description
--- | --- | ---
`QStyleOptionTab::NotAdjacent` | `0` | The tab is not adjacent to a selected tab (or is the selected tab).
`QStyleOptionTab::NextIsSelected` | `1` | The next tab (typically the tab on the right) is selected.
`QStyleOptionTab::PreviousIsSelected` | `2` | The previous tab (typically the tab on the left) is selected.

See also selectedPosition.

### enum QStyleOptionTab::TabPosition

Constant | Value | Description
--- | --- | ---
`QStyleOptionTab::Beginning` | `0` | The tab is the first tab in the tab bar.
`QStyleOptionTab::Middle` | `1` | The tab is neither the first nor the last tab in the tab bar.
`QStyleOptionTab::End` | `2` | The tab is the last tab in the tab bar.
`QStyleOptionTab::OnlyOneTab` | `3` | The tab is both the first and the last tab in the tab bar.

See also position.

## Property Documentation

### icon : const QIcon

This property holds the icon for the tab.

### position : const TabPosition

This property holds the position of the tab in the tab bar.

### row : const int

This property holds which row the tab is currently in.

0 indicates the front row.

Currently this property can only be 0.

### selectedPosition : const SelectedPosition

This property holds the position of the selected tab in relation to this tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.

### shape : const QTabBar::Shape

This property holds the tab shape used to draw the tab.

See also QTabBar::Shape.

### text : const QString

This property holds the text of the tab.

## Member Function Documentation

### QStyleOptionTab::QStyleOptionTab ()

Constructs a QStyleOptionTab object. The members variables are initialized to default values.

### QStyleOptionTab::QStyleOptionTab ( const QStyleOptionTab & other )