Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QStyleOptionComboBox Class Reference

\variable QStyleOptionToolButton::features More...

#include <qstyleoption.h>

+ Inheritance diagram for QStyleOptionComboBox:
+ Collaboration diagram for QStyleOptionComboBox:

Public Types

enum  StyleOptionType { Type = SO_ComboBox }
 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 Types inherited from QStyleOptionComplex
enum  StyleOptionType { Type = SO_Complex }
 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 Types inherited from QStyleOption
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

 QStyleOptionComboBox ()
 Creates a QStyleOptionComboBox, initializing the members variables to their default values.
 
 QStyleOptionComboBox (const QStyleOptionComboBox &other)
 Constructs a copy of the other style option.
 
QStyleOptionComboBoxoperator= (const QStyleOptionComboBox &)=default
 
- Public Member Functions inherited from QStyleOptionComplex
 QStyleOptionComplex (int version=QStyleOptionComplex::Version, int type=SO_Complex)
 Constructs a QStyleOptionComplex of the specified type and version, initializing the member variables to their default values.
 
 QStyleOptionComplex (const QStyleOptionComplex &other)
 Constructs a copy of the other style option.
 
QStyleOptionComplexoperator= (const QStyleOptionComplex &)=default
 
- Public Member Functions inherited from QStyleOption
 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)
 
QStyleOptionoperator= (const QStyleOption &other)
 Assign other to this QStyleOption.
 

Public Attributes

bool editable
 
QRect popupRect
 
bool frame
 
QString currentText
 
QIcon currentIcon
 
QSize iconSize
 
Qt::Alignment textAlignment = Qt::AlignLeft | Qt::AlignVCenter
 
- Public Attributes inherited from QStyleOptionComplex
QStyle::SubControls subControls
 
QStyle::SubControls activeSubControls
 
- Public Attributes inherited from QStyleOption
int version
 
int type
 
QStyle::State state
 
Qt::LayoutDirection direction
 
QRect rect
 
QFontMetrics fontMetrics
 
QPalette palette
 
QObjectstyleObject
 

Protected Member Functions

 QStyleOptionComboBox (int version)
 

Additional Inherited Members

Detailed Description

\variable QStyleOptionToolButton::features

an OR combination of the tool button's features

The default value is \l None.

See also
ToolButtonFeature

\variable QStyleOptionToolButton::icon

the icon for the tool button

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

See also
iconSize

\variable QStyleOptionToolButton::iconSize

the size of the icon for the tool button

The default value is QSize(-1, -1), i.e. an invalid size.

\variable QStyleOptionToolButton::text

the text of the tool button

This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. The default value is an empty string.

\variable QStyleOptionToolButton::arrowType

the direction of the arrow for the tool button

This value is only used if \l features includes \l Arrow. The default value is Qt::DownArrow.

\variable QStyleOptionToolButton::toolButtonStyle

a Qt::ToolButtonStyle value describing the appearance of the tool button

The default value is Qt::ToolButtonIconOnly.

See also
QToolButton::toolButtonStyle()

\variable QStyleOptionToolButton::pos

the position of the tool button

The default value is a null point, i.e. (0, 0)

\variable QStyleOptionToolButton::font

the font that is used for the text

This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly. By default, the application's default font is used.

The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.

\inmodule QtWidgets

QStyleOptionButton contains all the information that QStyle functions need to draw QComboBox.

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
QStyleOption, QStyleOptionComplex, QComboBox

Definition at line 572 of file qstyleoption.h.

Member Enumeration Documentation

◆ StyleOptionType

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_ComboBox} 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.

See also
StyleOptionVersion
Enumerator
Type 

Definition at line 575 of file qstyleoption.h.

◆ StyleOptionVersion

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.

See also
StyleOptionType
Enumerator
Version 

Definition at line 576 of file qstyleoption.h.

Constructor & Destructor Documentation

◆ QStyleOptionComboBox() [1/3]

QStyleOptionComboBox::QStyleOptionComboBox ( )

Creates a QStyleOptionComboBox, initializing the members variables to their default values.

Definition at line 2471 of file qstyleoption.cpp.

◆ QStyleOptionComboBox() [2/3]

QStyleOptionComboBox::QStyleOptionComboBox ( const QStyleOptionComboBox & other)
inline

Constructs a copy of the other style option.

Definition at line 587 of file qstyleoption.h.

References other().

+ Here is the call graph for this function:

◆ QStyleOptionComboBox() [3/3]

QStyleOptionComboBox::QStyleOptionComboBox ( int version)
protected

Definition at line 2479 of file qstyleoption.cpp.

Member Function Documentation

◆ operator=()

QStyleOptionComboBox & QStyleOptionComboBox::operator= ( const QStyleOptionComboBox & )
default

Member Data Documentation

◆ currentIcon

QIcon QStyleOptionComboBox::currentIcon

Definition at line 582 of file qstyleoption.h.

◆ currentText

QString QStyleOptionComboBox::currentText

Definition at line 581 of file qstyleoption.h.

◆ editable

bool QStyleOptionComboBox::editable

Definition at line 578 of file qstyleoption.h.

◆ frame

bool QStyleOptionComboBox::frame

Definition at line 580 of file qstyleoption.h.

◆ iconSize

QSize QStyleOptionComboBox::iconSize

Definition at line 583 of file qstyleoption.h.

◆ popupRect

QRect QStyleOptionComboBox::popupRect

Definition at line 579 of file qstyleoption.h.

◆ textAlignment

Qt::Alignment QStyleOptionComboBox::textAlignment = Qt::AlignLeft | Qt::AlignVCenter

Definition at line 584 of file qstyleoption.h.


The documentation for this class was generated from the following files: