Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Tous les espaces de nom  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QStyleOptionTab Class Reference
[QtGui module]

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

 #include <QStyleOptionTab>

Inherits QStyleOption.

Inherited by QStyleOptionTabV2.

Public Types

Public Functions

Public Variables


Detailed Description

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

The QStyleOptionTab class is used for drawing several built-in Qt widgets including QTabBar and the panel for QTabWidget. Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the QStyleOptionFrameV2 subclass.

An instance of the QStyleOptiontabV2 class has type SO_Tab and version 1. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.

If you create your own QStyle subclass, you should handle both QStyleOptionTab and QStyleOptionTabV2.

For an example demonstrating how style options can be used, see the Styles example.

See also QStyleOptionTabV2 and QStyleOption.


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

This enum describes the position of the selected tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.

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::StyleOptionType

This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.

ConstantValueDescription
QStyleOptionTab::TypeSO_TabThe type of style option provided (SO_Tab for this class).

The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.

See also StyleOptionVersion.

enum QStyleOptionTab::StyleOptionVersion

This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

ConstantValueDescription
QStyleOptionTab::Version11

The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.

See also StyleOptionType.

enum QStyleOptionTab::TabPosition

This enum describes the position of the tab.

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, initializing the members variables to their default values.

QStyleOptionTab::QStyleOptionTab ( const QStyleOptionTab & other )

Constructs a copy of the other style option.


Member Variable Documentation

CornerWidgets QStyleOptionTab::cornerWidgets

This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar.

The default value is NoCornerWidgets.

See also CornerWidget.

QIcon QStyleOptionTab::icon

This variable holds the icon for the tab.

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

TabPosition QStyleOptionTab::position

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

The default value is Beginning, i.e. the tab is the first tab in the tab bar.

int QStyleOptionTab::row

This variable holds which row the tab is currently in.

The default value is 0, indicating 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.

The default value is NotAdjacent, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.

QTabBar::Shape QStyleOptionTab::shape

This variable holds the tab shape used to draw the tab; by default QTabBar::RoundedNorth.

See also QTabBar::Shape.

QString QStyleOptionTab::text

This variable holds the text of the tab.

The default value is an empty string.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année

Le Qt Labs au hasard

Logo

QLocale : à propos du temps (et des dates, et des langues, et des...)

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web