| 286 | } |
| 287 | |
| 288 | void ExpandingDelegate::drawBackground(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const |
| 289 | { |
| 290 | Q_UNUSED(index) |
| 291 | QStyleOptionViewItem opt = option; |
| 292 | //initStyleOption(&opt, index); |
| 293 | //Problem: This isn't called at all, because drawBrackground is not virtual :-/ |
| 294 | QStyle* style = model()->treeView()->style() ? model()->treeView()->style() : QApplication::style(); |
| 295 | style->drawControl(QStyle::CE_ItemViewItem, &opt, painter); |
| 296 | } |
| 297 | |
| 298 | ExpandingWidgetModel* ExpandingDelegate::model() const |
| 299 | { |