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
QStyleOptionFrame Class Reference

\variable QStyleOptionFocusRect::backgroundColor More...

#include <qstyleoption.h>

+ Inheritance diagram for QStyleOptionFrame:
+ Collaboration diagram for QStyleOptionFrame:

Public Types

enum  StyleOptionType { Type = SO_Frame }
 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  FrameFeature { None = 0x00 , Flat = 0x01 , Rounded = 0x02 }
 \variable QStyleOptionFrame::lineWidth 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

 QStyleOptionFrame ()
 Constructs a QStyleOptionFrame, initializing the members variables to their default values.
 
 QStyleOptionFrame (const QStyleOptionFrame &other)
 Constructs a copy of the other style option.
 
QStyleOptionFrameoperator= (const QStyleOptionFrame &)=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

int lineWidth
 
int midLineWidth
 
FrameFeatures features
 
QFrame::Shape frameShape
 
- 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

 QStyleOptionFrame (int version)
 

Additional Inherited Members

Detailed Description

\variable QStyleOptionFocusRect::backgroundColor

the background color on which the focus rectangle is being drawn

The default value is an invalid color with the RGB value (0, 0, 0). An invalid color is a color that is not properly set up for the underlying window system.

The QStyleOptionFrame class is used to describe the parameters for drawing a frame.

\inmodule QtWidgets

QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame, QGroupBox, QLineEdit, and QMenu.

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.

An instance of the QStyleOptionFrame class has \l{QStyleOption::type} {type} SO_Frame and \l{QStyleOption::version} {version} 3.

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. 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
QStyleOption

Definition at line 90 of file qstyleoption.h.

Member Enumeration Documentation

◆ FrameFeature

\variable QStyleOptionFrame::lineWidth

the line width for drawing the frame

The default value is 0.

See also
QFrame::lineWidth

\variable QStyleOptionFrame::midLineWidth

the mid-line width for drawing the frame

This is usually used in drawing sunken or raised frames.

The default value is 0.

See also
QFrame::midLineWidth

This enum describes the different types of features a frame can have.

\value None Indicates a normal frame. \value Flat Indicates a flat frame. \value Rounded Indicates a rounded frame.

Enumerator
None 
Flat 
Rounded 

Definition at line 98 of file qstyleoption.h.

◆ 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_Frame} 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 93 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 3

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 94 of file qstyleoption.h.

Constructor & Destructor Documentation

◆ QStyleOptionFrame() [1/3]

QStyleOptionFrame::QStyleOptionFrame ( )

Constructs a QStyleOptionFrame, initializing the members variables to their default values.

Definition at line 433 of file qstyleoption.cpp.

◆ QStyleOptionFrame() [2/3]

QStyleOptionFrame::QStyleOptionFrame ( const QStyleOptionFrame & other)
inline

Constructs a copy of the other style option.

Definition at line 108 of file qstyleoption.h.

References other().

+ Here is the call graph for this function:

◆ QStyleOptionFrame() [3/3]

QStyleOptionFrame::QStyleOptionFrame ( int version)
protected

Definition at line 441 of file qstyleoption.cpp.

Member Function Documentation

◆ operator=()

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

Member Data Documentation

◆ features

FrameFeatures QStyleOptionFrame::features

Definition at line 104 of file qstyleoption.h.

◆ frameShape

QFrame::Shape QStyleOptionFrame::frameShape

Definition at line 105 of file qstyleoption.h.

◆ lineWidth

int QStyleOptionFrame::lineWidth

Definition at line 96 of file qstyleoption.h.

◆ midLineWidth

int QStyleOptionFrame::midLineWidth

Definition at line 97 of file qstyleoption.h.


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