The QStyleOptionViewItemV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.2 or above. 更多...
| 头: | #include <QStyleOptionViewItemV2> |
| Since: | Qt 4.2 |
| 继承: | QStyleOptionViewItem |
| 继承者: | QStyleOptionViewItemV3 |
| enum | StyleOptionVersion { Version } |
| enum | ViewItemFeature { None, WrapText, Alternate, HasCheckIndicator, HasDisplay, HasDecoration } |
| flags | ViewItemFeatures |
| QStyleOptionViewItemV2 () | |
| QStyleOptionViewItemV2 (const QStyleOptionViewItemV2 & other ) | |
| QStyleOptionViewItemV2 (const QStyleOptionViewItem & other ) | |
| QStyleOptionViewItemV2 & | operator= (const QStyleOptionViewItem & other ) |
| ViewItemFeatures | features |
The QStyleOptionViewItemV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.2 or above.
QStyleOptionViewItemV2 继承 QStyleOptionViewItem .
An instance of the QStyleOptionViewItemV2 class has type SO_ViewItem and version 2. The type is used internally by QStyleOption ,其子类,和 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 子类以实现扩展在不破坏兼容性的情况下。若使用 qstyleoption_cast (),通常不需要校验它。
见 QStyleOptionFrameV2 's detailed description for a discussion of how to handle "V2" classes.
另请参阅 QStyleOptionViewItem and QStyleOption .
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption 子类。
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionViewItemV2::Version
|
2
|
2 |
版本的使用通过 QStyleOption 子类以实现扩展在不破坏兼容性的情况下。若使用 qstyleoption_cast (),通常不需要校验它。
另请参阅 StyleOptionType .
This enum describes the different types of features an item can have.
| 常量 | 值 | 描述 |
|---|---|---|
QStyleOptionViewItemV2::None
|
0x00
|
指示正常项。 |
QStyleOptionViewItemV2::WrapText
|
0x01
|
Indicates an item with wrapped text. |
QStyleOptionViewItemV2::Alternate
|
0x02
|
Indicates that the item's background is rendered using alternateBase. |
QStyleOptionViewItemV2::HasCheckIndicator
|
0x04
|
Indicates that the item has a check state indicator. |
QStyleOptionViewItemV2::HasDisplay
|
0x08
|
Indicates that the item has a display role. |
QStyleOptionViewItemV2::HasDecoration
|
0x10
|
Indicates that the item has a decoration role. |
The ViewItemFeatures type is a typedef for QFlags <ViewItemFeature>. It stores an OR combination of ViewItemFeature values.
构造 QStyleOptionViewItemV2 对象。
构造副本为 other .
构造 QStyleOptionViewItemV2 copy of the other style option which can be either of the QStyleOptionViewItemV2 or QStyleOptionViewItem 类型。
若 other style option's version is 1, the new style option's ViewItemFeature value is set to QStyleOptionViewItemV2::None . If its version is 2, its ViewItemFeature value is simply copied to the new style option.
另请参阅 version .
赋值 other style option to this style option. The other style option can be either of the QStyleOptionViewItemV2 or QStyleOptionViewItem 类型。
若 other style option's version is 1, this style option's ViewItemFeature value is set to QStyleOptionViewItemV2::None . If its version is 2, its ViewItemFeature value is simply copied to this style option.
This variable holds a bitwise OR of the features that describe this view item.
另请参阅 ViewItemFeature .