- class QStyleOptionTab¶
The
QStyleOptionTab
class is used to describe the parameters for drawing a tab bar. More…Synopsis¶
Methods¶
def
__init__()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
The
QStyleOptionTab
class is used for drawing several built-in Qt widgets includingQTabBar
and the panel forQTabWidget
.An instance of the
QStyleOptionTab
class has typeSO_Tab
and version 3. The type is used internally byQStyleOption
, its subclasses, andqstyleoption_cast()
to determine the type of style option. In general you do not need to worry about this unless you want to create your ownQStyleOption
subclass and your own styles. The version is used byQStyleOption
subclasses to implement extensions without breaking compatibility. If you useqstyleoption_cast()
, you normally do not need to check it.For performance reasons, there are few member functions and the access to the member variables is direct (i.e., using the
.
or->
operator). This makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.See also
- class StyleOptionType¶
This enum is used to hold information about the type of the style option, and is defined for each
QStyleOption
subclass.Constant
Description
QStyleOptionTab.Type
The type of style option provided (
SO_Tab
for this class).The type is used internally by
QStyleOption
, its subclasses, andqstyleoption_cast()
to determine the type of style option. In general you do not need to worry about this unless you want to create your ownQStyleOption
subclass and your own styles.See also
- class StyleOptionVersion¶
This enum is used to hold information about the version of the style option, and is defined for each
QStyleOption
subclass.Constant
Description
QStyleOptionTab.Version
3
The version is used by
QStyleOption
subclasses to implement extensions without breaking compatibility. If you useqstyleoption_cast()
, you normally do not need to check it.See also
- class TabPosition¶
This enum describes the position of the tab.
Constant
Description
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.
QStyleOptionTab.Moving
The tab is moving by mouse drag or animation.
See also
- class 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.
Constant
Description
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.
See also
- class CornerWidget¶
(inherits
enum.Flag
) These flags indicate the corner widgets in a tab.Constant
Description
QStyleOptionTab.NoCornerWidgets
There are no corner widgets
QStyleOptionTab.LeftCornerWidget
Left corner widget
QStyleOptionTab.RightCornerWidget
Right corner widget
See also
- class TabFeature¶
(inherits
enum.Flag
) Describes the various features that a tab button can have.Constant
Description
QStyleOptionTab.None
A normal tab button.
QStyleOptionTab.HasFrame
The tab button is positioned on a tab frame
See also
- PySide6.QtWidgets.QStyleOptionTab.shape¶
- PySide6.QtWidgets.QStyleOptionTab.text¶
- PySide6.QtWidgets.QStyleOptionTab.icon¶
- PySide6.QtWidgets.QStyleOptionTab.row¶
- PySide6.QtWidgets.QStyleOptionTab.position¶
- PySide6.QtWidgets.QStyleOptionTab.selectedPosition¶
- PySide6.QtWidgets.QStyleOptionTab.cornerWidgets¶
- PySide6.QtWidgets.QStyleOptionTab.iconSize¶
- PySide6.QtWidgets.QStyleOptionTab.documentMode¶
- PySide6.QtWidgets.QStyleOptionTab.leftButtonSize¶
- PySide6.QtWidgets.QStyleOptionTab.rightButtonSize¶
- PySide6.QtWidgets.QStyleOptionTab.features¶
- PySide6.QtWidgets.QStyleOptionTab.tabIndex¶
- __init__()¶
Constructs a
QStyleOptionTab
object, initializing the members variables to their default values.- __init__(other)
- Parameters:
other –
QStyleOptionTab
Constructs a copy of the
other
style option.- __init__(version)
- Parameters:
version – int
Constructs a copy of the
other
style option.