QWidget * PropertyDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const { AbstractProperty * property = retrieveProperty(index); if (property->isCollection()) return QStyledItemDelegate::createEditor(parent, option, index); return m_editorFactory->createEditor(*property, parent); }
void PropertyDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const { QStyledItemDelegate::paint(painter, option, index); AbstractProperty * property = retrieveProperty(index); if (property->isCollection()) return; QStyleOptionViewItem opt = option; initStyleOption(&opt, index); m_propertyPainter->drawValue(painter, opt, *property); }