![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\variable QStyleOptionHeaderV2::textElideMode More...
#include <qstyleoption.h>
Public Types | |
enum | StyleOptionType { Type = SO_Button } |
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 | ButtonFeature { None = 0x00 , Flat = 0x01 , HasMenu = 0x02 , DefaultButton = 0x04 , AutoDefaultButton = 0x08 , CommandLinkButton = 0x10 } |
This enum describes the different types of features a push button can have. 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 | |
QStyleOptionButton () | |
Constructs a QStyleOptionButton, initializing the members variables to their default values. | |
QStyleOptionButton (const QStyleOptionButton &other) | |
Constructs a copy of the other style option. | |
QStyleOptionButton & | operator= (const QStyleOptionButton &)=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 | |
ButtonFeatures | features |
QString | text |
QIcon | icon |
QSize | iconSize |
![]() | |
int | version |
int | type |
QStyle::State | state |
Qt::LayoutDirection | direction |
QRect | rect |
QFontMetrics | fontMetrics |
QPalette | palette |
QObject * | styleObject |
Protected Member Functions | |
QStyleOptionButton (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 QStyleOptionHeaderV2::textElideMode
where ellipsis should be added for text that is too long to fit into an item
The default value is Qt::ElideNone.
\variable QStyleOptionHeaderV2::isSectionDragTarget
whether the section is the location at which a dragged section will be inserted
The QStyleOptionButton class is used to describe the parameters for drawing buttons.
\inmodule QtWidgets
QStyleOptionButton contains all the information that QStyle functions need to draw graphical elements like QPushButton, QCheckBox, and QRadioButton.
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 215 of file qstyleoption.h.
This enum describes the different types of features a push button can have.
\value None Indicates a normal push button. \value Flat Indicates a flat push button. \value HasMenu Indicates that the button has a drop down menu. \value DefaultButton Indicates that the button is a default button. \value AutoDefaultButton Indicates that the button is an auto default button. \value CommandLinkButton Indicates that the button is a Windows Vista type command link.
Enumerator | |
---|---|
None | |
Flat | |
HasMenu | |
DefaultButton | |
AutoDefaultButton | |
CommandLinkButton |
Definition at line 221 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_Button} 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 218 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 1
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 219 of file qstyleoption.h.
QStyleOptionButton::QStyleOptionButton | ( | ) |
Constructs a QStyleOptionButton, initializing the members variables to their default values.
Definition at line 926 of file qstyleoption.cpp.
|
inline |
Constructs a copy of the other style option.
Definition at line 231 of file qstyleoption.h.
|
protected |
Definition at line 934 of file qstyleoption.cpp.
|
default |
ButtonFeatures QStyleOptionButton::features |
Definition at line 225 of file qstyleoption.h.
Referenced by testing.tools.test_runner._PerProcessConfig::InitializeFeatures().
QIcon QStyleOptionButton::icon |
Definition at line 227 of file qstyleoption.h.
QSize QStyleOptionButton::iconSize |
Definition at line 228 of file qstyleoption.h.
QString QStyleOptionButton::text |
Definition at line 226 of file qstyleoption.h.