An item delegate that displays an image and some text.
More...
#include <ImageAndTextDelegate.h++>
|
| ImageAndTextDelegate (const QSize &iconSize, QObject *parent=NULL) |
| Constructs a new ImageAndTextDelegate with the given image size. More...
|
|
virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| Specified by QAbstractItemDelegate. More...
|
|
virtual QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| Specified by QAbstractItemDelegate. More...
|
|
An item delegate that displays an image and some text.
- Author
- Mark Lindner
◆ ImageAndTextDelegate()
Constructs a new ImageAndTextDelegate with the given image size.
The text is taken from the model item's display role and the image (QIcon) is taken from the model item's decoration role.
- Parameters
-
◆ paint()
virtual void paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
virtual |
Specified by QAbstractItemDelegate.
◆ sizeHint()
virtual QSize sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
virtual |
Specified by QAbstractItemDelegate.
The documentation for this class was generated from the following file: