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.

Public Types

Public Functions

Public Variables

Static Public Members


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

These flags indicate the corner widgets in a tab.

ConstantValueDescription
QStyleOptionTab::NoCornerWidgets0x00There are no corner widgets
QStyleOptionTab::LeftCornerWidget0x01Left corner widget
QStyleOptionTab::RightCornerWidget0x02Right corner widget

The CornerWidgets type is a typedef for QFlags<CornerWidget>. It stores an OR combination of CornerWidget values.

See also cornerWidgets.

enum QStyleOptionTab::SelectedPosition

ConstantValueDescription
QStyleOptionTab::NotAdjacent0The tab is not adjacent to a selected tab (or is the selected tab).
QStyleOptionTab::NextIsSelected1The next tab (typically the tab on the right) is selected.
QStyleOptionTab::PreviousIsSelected2The previous tab (typically the tab on the left) is selected.

See also selectedPosition.

enum QStyleOptionTab::TabPosition

ConstantValueDescription
QStyleOptionTab::Beginning0The tab is the first tab in the tab bar.
QStyleOptionTab::Middle1The tab is neither the first nor the last tab in the tab bar.
QStyleOptionTab::End2The tab is the last tab in the tab bar.
QStyleOptionTab::OnlyOneTab3The tab is both the first and the last tab in the tab bar.

See also position.


Member Function Documentation

QStyleOptionTab::QStyleOptionTab ()

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

QStyleOptionTab::QStyleOptionTab ( const QStyleOptionTab & other )

Constructs a copy of the other style option.


Member Variable Documentation

const int QStyleOptionTab::Type

Equals SO_Tab.

const int QStyleOptionTab::Version

Equals 1.

CornerWidgets QStyleOptionTab::cornerWidgets

This variable holds information on the cornerwidgets of the tab bar.

See also CornerWidget.

QIcon QStyleOptionTab::icon

This variable holds the icon for the tab.

TabPosition QStyleOptionTab::position

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

int QStyleOptionTab::row

This variable holds which row the tab is currently in.

0 indicates the front row.

Currently this property can only be 0.

SelectedPosition QStyleOptionTab::selectedPosition

This variable 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.

QTabBar::Shape QStyleOptionTab::shape

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

See also QTabBar::Shape.

QString QStyleOptionTab::text

This variable holds the text of the tab.


Copyright © 2005 Trolltech Trademarks
Qt 4.0.0