|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QStyleOptionViewItem Class Reference

The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget. More...

    #include <QStyleOptionViewItem>

Part of the QtGui module.

Inherits QStyleOption.

- List of all members, including inherited members

### Public Types

- enum Position { Left, Right, Top, Bottom }

### Properties

- decorationAlignment : const Qt::Alignment
- decorationPosition : const Position
- decorationSize : const QSize

- displayAlignment : const Qt::Alignment
- font : const QFont

- 5 properties inherited from QStyleOption

### Public Functions

- QStyleOptionViewItem ()
- QStyleOptionViewItem ( const QStyleOptionViewItem & other )

- 2 public functions inherited from QStyleOption

## Detailed Description

The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.

The QStyleOptionViewItem class is used by Qt's model/view classes to draw their items.

See also Model/View Programming.

## Member Type Documentation

### enum QStyleOptionViewItem::Position

This enum describes the position of the item's decoration.

Constant | Value | Description
--- | --- | ---
`QStyleOptionViewItem::Left` | `0` | On the left of the text.
`QStyleOptionViewItem::Right` | `1` | On the right of the text.
`QStyleOptionViewItem::Top` | `2` | Above the text.
`QStyleOptionViewItem::Bottom` | `3` | Below the text.

See also decorationPosition.

## Property Documentation

### decorationAlignment : const Qt::Alignment

This property holds the alignment of the decoration for the item.

### decorationPosition : const Position

This property holds the position of the decoration for the item.

See also Position.

### decorationSize : const QSize

This property holds the size ofthe decoration for the item.

See also Size.

### displayAlignment : const Qt::Alignment

This property holds the alignment of the display value for the item.

### font : const QFont

This property holds the font used for the item.

See also QFont.

## Member Function Documentation

### QStyleOptionViewItem::QStyleOptionViewItem ()

Constructs a QStyleOptionViewItem. The members variables are initialized to default values.

### QStyleOptionViewItem::QStyleOptionViewItem ( const QStyleOptionViewItem & other )