![]() |
Qt 6.x
The Qt SDK
|
\variable QStyleOptionComboBox::editable More...
#include <qstyleoption.h>
Public Types | |
enum | StyleOptionType { Type = SO_ToolBox } |
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. More... | |
enum | StyleOptionVersion { Version = 1 } |
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. More... | |
enum | TabPosition { Beginning , Middle , End , OnlyOneTab } |
This enum describes tab positions relative to other tabs. More... | |
enum | SelectedPosition { NotAdjacent , NextIsSelected , PreviousIsSelected } |
\variable QStyleOptionToolBox::icon More... | |
![]() | |
enum | OptionType { SO_Default , SO_FocusRect , SO_Button , SO_Tab , SO_MenuItem , SO_Frame , SO_ProgressBar , SO_ToolBox , SO_Header , SO_DockWidget , SO_ViewItem , SO_TabWidgetFrame , SO_TabBarBase , SO_RubberBand , SO_ToolBar , SO_GraphicsItem , SO_Complex = 0xf0000 , SO_Slider , SO_SpinBox , SO_ToolButton , SO_ComboBox , SO_TitleBar , SO_GroupBox , SO_SizeGrip , SO_CustomBase = 0xf00 , SO_ComplexCustomBase = 0xf000000 } |
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. More... | |
enum | StyleOptionType { Type = SO_Default } |
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. More... | |
enum | StyleOptionVersion { Version = 1 } |
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. More... | |
Public Member Functions | |
QStyleOptionToolBox () | |
Creates a QStyleOptionToolBox, initializing the members variables to their default values. | |
QStyleOptionToolBox (const QStyleOptionToolBox &other) | |
Constructs a copy of the other style option. | |
QStyleOptionToolBox & | operator= (const QStyleOptionToolBox &)=default |
![]() | |
QStyleOption (int version=QStyleOption::Version, int type=SO_Default) | |
Constructs a QStyleOption with the specified version and type. | |
QStyleOption (const QStyleOption &other) | |
Constructs a copy of other. | |
~QStyleOption () | |
Destroys this style option object. | |
void | initFrom (const QWidget *w) |
QStyleOption & | operator= (const QStyleOption &other) |
Assign other to this QStyleOption. | |
Public Attributes | |
QString | text |
QIcon | icon |
TabPosition | position |
SelectedPosition | selectedPosition |
![]() | |
int | version |
int | type |
QStyle::State | state |
Qt::LayoutDirection | direction |
QRect | rect |
QFontMetrics | fontMetrics |
QPalette | palette |
QObject * | styleObject |
Protected Member Functions | |
QStyleOptionToolBox (int version) | |
Additional Inherited Members | |
![]() | |
template< typename T > T | qstyleoption_cast (const QStyleOption *option) |
\variable QStyleOptionTitleBar::text | |
template< typename T > T | qstyleoption_cast (QStyleOption *option) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
\variable QStyleOptionComboBox::editable
whether or not the combobox is editable or not
the default value is false
\variable QStyleOptionComboBox::frame
whether the combo box has a frame
The default value is true.
\variable QStyleOptionComboBox::currentText
the text for the current item of the combo box
The default value is an empty string.
\variable QStyleOptionComboBox::currentIcon
the icon for the current item of the combo box
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
\variable QStyleOptionComboBox::iconSize
the icon size for the current item of the combo box
The default value is QSize(-1, -1), i.e. an invalid size.
\variable QStyleOptionComboBox::popupRect
the popup rectangle for the combobox
The default value is a null rectangle, i.e. a rectangle with both the width and the height set to 0.
This variable is currently unused. You can safely ignore it.
\variable QStyleOptionComboBox::textAlignment
the alignment of the current text in the combo box
The default value is Qt::AlignLeft | Qt::AlignVCenter.
The QStyleOptionToolBox class is used to describe the parameters needed for drawing a tool box.
\inmodule QtWidgets
QStyleOptionToolBox contains all the information that QStyle functions need to draw QToolBox.
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.
Definition at line 436 of file qstyleoption.h.
\variable QStyleOptionToolBox::icon
the icon for the tool box tab
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
\variable QStyleOptionToolBox::text
the text for the tool box tab
The default value is an empty string.
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.
\value NotAdjacent The tab is not adjacent to a selected tab (or is the selected tab). \value NextIsSelected The next tab (typically the tab on the right) is selected. \value PreviousIsSelected The previous tab (typically the tab on the left) is selected.
Enumerator | |
---|---|
NotAdjacent | |
NextIsSelected | |
PreviousIsSelected |
Definition at line 446 of file qstyleoption.h.
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
\value Type The type of style option provided (\l{SO_ToolBox} 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.
Enumerator | |
---|---|
Type |
Definition at line 439 of file qstyleoption.h.
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
\value Version 2
The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
Enumerator | |
---|---|
Version |
Definition at line 440 of file qstyleoption.h.
This enum describes tab positions relative to other tabs.
\value Beginning The tab is the first (i.e., top-most) tab in the toolbox. \value Middle The tab is placed in the middle of the toolbox. \value End The tab is placed at the bottom of the toolbox. \value OnlyOneTab There is only one tab in the toolbox.
Enumerator | |
---|---|
Beginning | |
Middle | |
End | |
OnlyOneTab |
Definition at line 445 of file qstyleoption.h.
QStyleOptionToolBox::QStyleOptionToolBox | ( | ) |
Creates a QStyleOptionToolBox, initializing the members variables to their default values.
Definition at line 2604 of file qstyleoption.cpp.
|
inline |
Constructs a copy of the other style option.
Definition at line 452 of file qstyleoption.h.
References other().
|
protected |
Definition at line 2612 of file qstyleoption.cpp.
|
default |
QIcon QStyleOptionToolBox::icon |
Definition at line 443 of file qstyleoption.h.
TabPosition QStyleOptionToolBox::position |
Definition at line 448 of file qstyleoption.h.
SelectedPosition QStyleOptionToolBox::selectedPosition |
Definition at line 449 of file qstyleoption.h.
QString QStyleOptionToolBox::text |
Definition at line 442 of file qstyleoption.h.