The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in Qt 4.4 or above. More...
#include <QStyleOptionViewItemV4>
Inherits: QStyleOptionViewItemV3.
This class was introduced in Qt 4.4.
enum | StyleOptionVersion { Version } |
enum | ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne } |
QStyleOptionViewItemV4 () | |
QStyleOptionViewItemV4 ( const QStyleOptionViewItemV4 & other ) | |
QStyleOptionViewItemV4 ( const QStyleOptionViewItem & other ) | |
QStyleOptionViewItemV4 & | operator= ( const QStyleOptionViewItem & other ) |
QBrush | backgroundBrush |
Qt::CheckState | checkState |
QIcon | icon |
QModelIndex | index |
QString | text |
ViewItemPosition | viewItemPosition |
The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in Qt 4.4 or above.
QStyleOptionViewItemV4 inherits QStyleOptionViewItemV3.
An instance of the QStyleOptionViewItemV4 class has type SO_ViewItem and version 4. 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 QStyleOptionViewItemV3's detailed description for a discussion of how to handle "V3" classes.
See also QStyleOptionViewItem and QStyleOption.
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
Constant | Value | Description |
---|---|---|
QStyleOptionViewItemV4::Version | 4 | 4 |
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.
This enum is used to represent the placement of the item on a row. This can be used to draw items differently depending on their placement, for example by putting rounded edges at the beginning and end, and straight edges in between.
Constant | Value | Description |
---|---|---|
QStyleOptionViewItemV4::Invalid | 0 | The ViewItemPosition is unknown and should be disregarded. |
QStyleOptionViewItemV4::Beginning | 1 | The item appears at the beginning of the row. |
QStyleOptionViewItemV4::Middle | 2 | The item appears in the middle of the row. |
QStyleOptionViewItemV4::End | 3 | The item appears at the end of the row. |
QStyleOptionViewItemV4::OnlyOne | 4 | The item is the only one on the row, and is therefore both at the beginning and the end. |
Constructs a QStyleOptionViewItemV4 object.
Constructs a copy of other.
Constructs a QStyleOptionViewItemV4 copy of the other style option which can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.
See also version.
Assigns the other style option to this style option. The other style option can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.
The QBrush that should be used to paint the view items background.
If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.
The icon (if any) to be drawn in the view item.
The model index that is to be drawn.
The text (if any) to be drawn in the view item.
Gives the position of this view item relative to other items. See the ViewItemPosition enum for the details.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.