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>

Inherits QStyleOption.

- List of all members, including inherited members

### Public Types

- enum Position { Left, Right, Top, Bottom }
- enum Size { Small, Large }

### Read-Only Properties

decorationAlignment : int decorationPosition : Position decorationSize : Size | displayAlignment : int font : QFont

- 5 read-only properties inherited from QStyleOption

### Public Functions

- QStyleOptionViewItem ()

- 1 public function 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.

`QStyleOptionViewItem::Left` | On the left of the text.
`QStyleOptionViewItem::Right` | On the right of the text.
`QStyleOptionViewItem::Top` | Above the text.
`QStyleOptionViewItem::Bottom` | Below the text.

See also decorationPosition.

### enum QStyleOptionViewItem::Size

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

`QStyleOptionViewItem::Small` | Small decorations.
`QStyleOptionViewItem::Large` | Large decorations.

See also decorationSize.

## Property Documentation

### decorationAlignment : int

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

### decorationPosition : Position

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

See also Position.

### decorationSize : Size

This property holds the size ofthe decoration for the item.

See also Size.

### displayAlignment : int

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

### font : QFont

## Member Function Documentation

### QStyleOptionViewItem::QStyleOptionViewItem ()

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