![]() |
Qt 6.x
The Qt SDK
|
\variable QStyleOptionGraphicsItem::exposedRect More...
#include <qstyleoption.h>
Public Types | |
enum | HintReturnType { SH_Default =0xf000 , SH_Mask , SH_Variant } |
\value SH_Default QStyleHintReturn \value SH_Mask \l QStyle::SH_RubberBand_Mask QStyle::SH_FocusFrame_Mask \value SH_Variant \l QStyle::SH_TextControl_FocusIndicatorTextCharFormat More... | |
enum | StyleOptionType { Type = SH_Default } |
This enum is used to hold information about the type of the style option, and is defined for each QStyleHintReturn 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 QStyleHintReturn subclass. More... | |
Public Member Functions | |
QStyleHintReturn (int version=QStyleOption::Version, int type=SH_Default) | |
\variable QStyleHintReturn::type | |
~QStyleHintReturn () | |
Public Attributes | |
int | version |
int | type |
Related Symbols | |
(Note that these are not member symbols.) | |
template< typename T > T | qstyleoption_cast (const QStyleHintReturn *hint) |
Returns a T or \nullptr depending on the \l{QStyleHintReturn::type}{type} and \l{QStyleHintReturn::version}{version} of hint. | |
template< typename T > T | qstyleoption_cast (QStyleHintReturn *hint) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
\variable QStyleOptionGraphicsItem::exposedRect
the exposed rectangle, in item coordinates
Make use of this rectangle to speed up item drawing when only parts of the item are exposed. If the whole item is exposed, this rectangle will be the same as QGraphicsItem::boundingRect().
This member is only initialized for items that have the QGraphicsItem::ItemUsesExtendedStyleOption flag set.
The QStyleHintReturn class provides style hints that return more than basic data types.
\inmodule QtWidgets
QStyleHintReturn and its subclasses are used to pass information from a style back to the querying widget. This is most useful when the return value from QStyle::styleHint() does not provide enough detail; for example, when a mask is to be returned.
Definition at line 689 of file qstyleoption.h.
\value SH_Default QStyleHintReturn \value SH_Mask \l QStyle::SH_RubberBand_Mask QStyle::SH_FocusFrame_Mask \value SH_Variant \l QStyle::SH_TextControl_FocusIndicatorTextCharFormat
Enumerator | |
---|---|
SH_Default | |
SH_Mask | |
SH_Variant |
Definition at line 691 of file qstyleoption.h.
This enum is used to hold information about the type of the style option, and is defined for each QStyleHintReturn subclass.
\value Type The type of style option provided (\l SH_Default for this class).
The type is used internally by QStyleHintReturn, 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 QStyleHintReturn subclass and your own styles.
Enumerator | |
---|---|
Type |
Definition at line 695 of file qstyleoption.h.
This enum is used to hold information about the version of the style option, and is defined for each QStyleHintReturn subclass.
\value Version 1
The version is used by QStyleHintReturn 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 696 of file qstyleoption.h.
QStyleHintReturn::QStyleHintReturn | ( | int | version = QStyleOption::Version , |
int | type = SH_Default |
||
) |
\variable QStyleHintReturn::type
the type of the style hint container
\variable QStyleHintReturn::version
the version of the style hint return container
This value can be used by subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast<T>(), you normally do not need to check it.
Constructs a QStyleHintReturn with version version and type type.
The version has no special meaning for QStyleHintReturn; it can be used by subclasses to distinguish between different version of the same hint type.
Definition at line 3676 of file qstyleoption.cpp.
QStyleHintReturn::~QStyleHintReturn | ( | ) |
Definition at line 3685 of file qstyleoption.cpp.
|
related |
Returns a T or \nullptr depending on the \l{QStyleHintReturn::type}{type} and \l{QStyleHintReturn::version}{version} of hint.
Example:
Definition at line 728 of file qstyleoption.h.
References hint(), and SH_Default.
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a T or \nullptr depending on the type of hint.
Definition at line 738 of file qstyleoption.h.
References hint(), and SH_Default.
int QStyleHintReturn::type |
Definition at line 702 of file qstyleoption.h.
int QStyleHintReturn::version |
Definition at line 701 of file qstyleoption.h.