QStyleOptionTab 類是用於繪製選項卡欄的描述參數。 更多...
| 頭: | #include <QStyleOptionTab> |
| qmake: | QT += widgets |
| 繼承: | QStyleOption |
| enum | CornerWidget { NoCornerWidgets, LeftCornerWidget, RightCornerWidget } |
| flags | CornerWidgets |
| enum | SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected } |
| enum | StyleOptionType { Type } |
| enum | StyleOptionVersion { Version } |
| enum | TabFeature { None, HasFrame } |
| flags | TabFeatures |
| enum | TabPosition { Beginning, Middle, End, OnlyOneTab } |
| QStyleOptionTab (const QStyleOptionTab & other ) | |
| QStyleOptionTab () |
| QStyleOptionTab::CornerWidgets | cornerWidgets |
| bool | documentMode |
| QIcon | icon |
| QSize | iconSize |
| QSize | leftButtonSize |
| QStyleOptionTab::TabPosition | position |
| QSize | rightButtonSize |
| int | row |
| QStyleOptionTab::SelectedPosition | selectedPosition |
| QTabBar::Shape | shape |
| QString | text |
QStyleOptionTab 類用於繪製幾種內置 Qt Widget 包括 QTabBar 和麵闆為 QTabWidget .
QStyleOptionTab 類實例擁有 type SO_Tab and version 3. The type is used internally by QStyleOption ,其子類,和 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 子類以實現擴展在不破壞兼容性的情況下。若使用 qstyleoption_cast (),通常不需要校驗它。
對於可以如何使用樣式選項的演示範例,見 樣式 範例。
另請參閱 QStyleOption .
這些標誌指示選項卡的角落小部件。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionTab::NoCornerWidgets
|
0x00
|
沒有角落 Widget |
QStyleOptionTab::LeftCornerWidget
|
0x01
|
左上角 Widget |
QStyleOptionTab::RightCornerWidget
|
0x02
|
右上角 Widget |
The CornerWidgets type is a typedef for QFlags <CornerWidget>. It stores an OR combination of CornerWidget values.
另請參閱 cornerWidgets .
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.
| 常量 | 值 | 描述 |
|---|---|---|
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. |
另請參閱 selectedPosition .
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionTab::Type
|
SO_Tab
|
提供樣式選項的類型 ( SO_Tab 對於此類)。 |
類型內部使用通過 QStyleOption ,其子類,和 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.
另請參閱 StyleOptionVersion .
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption 子類。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionTab::Version
|
3
|
3 |
版本的使用通過 QStyleOption 子類以實現擴展在不破壞兼容性的情況下。若使用 qstyleoption_cast (),通常不需要校驗它。
另請參閱 StyleOptionType .
Describes the various features that a tab button can have.
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionTab::None
|
0x00
|
A normal tab button. |
QStyleOptionTab::HasFrame
|
0x01
|
The tab button is positioned on a tab frame |
The TabFeatures type is a typedef for QFlags <TabFeature>. It stores an OR combination of TabFeature values.
另請參閱 QStyleOptionToolBar::features .
此枚舉描述選項卡的位置。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionTab::Beginning
|
0
|
選項卡是選項卡欄中的第一選項卡。 |
QStyleOptionTab::Middle
|
1
|
選項卡既不是選項卡欄中的第一選項卡,也不是最後選項卡。 |
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. |
另請參閱 position .
構造副本為 other 樣式選項。
Constructs a QStyleOptionTab object, initializing the members variables to their default values.
This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar
默認值為 NoCornerWidgets .
另請參閱 CornerWidget .
This variable holds whether the tabbar is in document mode.
默認值為 false;
This variable holds the icon for the tab
默認值為空圖標 (即:圖標既沒有像素圖,也沒有文件名)。
This variable holds the size for the icons
默認值為 QSize (-1, -1), i.e. an invalid size; use QStyle::pixelMetric () to find the default icon size for tab bars.
另請參閱 QTabBar::iconSize ().
This variable holds the size for the left widget on the tab.
默認值為 QSize (-1, -1), i.e. an invalid size;
This variable holds the position of the tab in the tab bar
默認值為 Beginning , i.e. the tab is the first tab in the tab bar.
This variable holds the size for the right widget on the tab.
默認值為 QSize (-1, -1), i.e. an invalid size;
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.
This variable holds the position of the selected tab in relation to this tab
默認值為 NotAdjacent , i.e. the tab is not adjacent to a selected tab nor is it the selected tab.
This variable holds the tab shape used to draw the tab; by default QTabBar::RoundedNorth
另請參閱 QTabBar::Shape .
此變量保持選項卡文本
默認值為空字符串。