Hi,
I suggest you to create your own Delegate class and implement paint(...) inside it.
There are plenty of code pieces in the Qt Doc like;
{
Q_OBJECT
public:
SpinBoxDelegate
(QObject *parent
= 0);
void updateEditorGeometry
(QWidget *editor,
};
class SpinBoxDelegate : public QItemDelegate
{
Q_OBJECT
public:
SpinBoxDelegate(QObject *parent = 0);
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 &option, const QModelIndex &index) const;
};
To copy to clipboard, switch view to plain text mode
and you need to add paint method to do painting
QAbstractItemDelegate::paint()
To copy to clipboard, switch view to plain text mode
Bookmarks