23 lines
734 B
C++
23 lines
734 B
C++
#ifndef ITEMTEXTDELEGATE_H
|
|
#define ITEMTEXTDELEGATE_H
|
|
|
|
#include <QItemDelegate>
|
|
#include <QWidget>
|
|
|
|
class ItemTextDelegate : public QItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ItemTextDelegate(QObject *parent = Q_NULLPTR);
|
|
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
|
const QModelIndex &index) const;
|
|
void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
|
void setModelData (QWidget *editor, QAbstractItemModel *model,
|
|
const QModelIndex &index) const;
|
|
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &opcion,
|
|
const QModelIndex &index) const;
|
|
};
|
|
|
|
#endif // ITEMTEXTDELEGATE_H
|