继承者: QStyleOptionTabV2 , QStyleOptionTabV3
PySide.QtGui.QStyleOptionTab class is used to describe the parameters for drawing a tab bar.
PySide.QtGui.QStyleOptionTab class is used for drawing several built-in Qt widgets including PySide.QtGui.QTabBar and the panel for PySide.QtGui.QTabWidget . Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the PySide.QtGui.QStyleOptionFrameV2 子类。
An instance of the QStyleOptiontabV2 class has type SO_Tab and version 1. The type is used internally by PySide.QtGui.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 PySide.QtGui.QStyleOption subclass and your own styles. The version is used by PySide.QtGui.QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast() , you normally do not need to check it.
If you create your own PySide.QtGui.QStyle subclass, you should handle both PySide.QtGui.QStyleOptionTab and PySide.QtGui.QStyleOptionTabV2 .
对于可以如何使用样式选项的演示范例,见 样式 范例。
| 参数: |
|
|---|
构造 PySide.QtGui.QStyleOptionTab object, initializing the members variables to their default values.
构造副本为 other 样式选项。
This enum is used to hold information about the version of the style option, and is defined for each PySide.QtGui.QStyleOption 子类。
| 常量 | 描述 |
|---|---|
| QStyleOptionTab.Version | 1 |
The version is used by PySide.QtGui.QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast() , you normally do not need to check it.
另请参阅
QStyleOptionTab.StyleOptionType
这些标志指示选项卡的角落小部件。
| 常量 | 描述 |
|---|---|
| QStyleOptionTab.NoCornerWidgets | 没有角落 Widget |
| QStyleOptionTab.LeftCornerWidget | 左上角 Widget |
| QStyleOptionTab.RightCornerWidget | 右上角 Widget |
另请参阅
cornerWidgets
This enum describes the position of the tab.
| 常量 | 描述 |
|---|---|
| QStyleOptionTab.Beginning | The tab is the first tab in the tab bar. |
| QStyleOptionTab.Middle | The tab is neither the first nor the last tab in the tab bar. |
| QStyleOptionTab.End | The tab is the last tab in the tab bar. |
| QStyleOptionTab.OnlyOneTab | The tab is both the first and the last tab in the tab bar. |
另请参阅
position
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 | The tab is not adjacent to a selected tab (or is the selected tab). |
| QStyleOptionTab.NextIsSelected | The next tab (typically the tab on the right) is selected. |
| QStyleOptionTab.PreviousIsSelected | 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 PySide.QtGui.QStyleOption 子类。
| 常量 | 描述 |
|---|---|
| QStyleOptionTab.Type | The type of style option provided ( SO_Tab for this class). |
The type is used internally by PySide.QtGui.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 PySide.QtGui.QStyleOption subclass and your own styles.
另请参阅
QStyleOptionTab.StyleOptionVersion