| 78 | } |
| 79 | |
| 80 | void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, |
| 81 | const QModelIndex &index) const |
| 82 | { |
| 83 | QStyleOptionViewItem opt = option; |
| 84 | opt.text = defaultDisplayText(index); |
| 85 | initStyleOption(&opt, index); |
| 86 | |
| 87 | const QWidget *widget = this->widget(option); |
| 88 | QStyle *style = this->style(option); |
| 89 | style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, widget); |
| 90 | } |