30 #include <QAbstractItemView> 41 : QStyledItemDelegate( parent_object )
46 const QStyleOptionViewItem & option,
47 const QModelIndex & index )
const 50 if( !prop || !prop->
paint( painter, option ))
52 QStyledItemDelegate::paint( painter, option, index );
57 const QStyleOptionViewItem & option,
58 const QModelIndex &index )
const 66 if( QWidget* editor = prop->
createEditor( parent, option ))
70 return QStyledItemDelegate::createEditor( parent, option, index );
A single element of a property tree, with a name, value, description, and possibly children...
PropertyTreeDelegate(QObject *parent_object=0)
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual bool paint(QPainter *painter, const QStyleOptionViewItem &option) const
Hook to provide custom painting of the value data (right-hand column) in a subclass.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option)
Create an editor widget to edit the value of this property.
virtual bool getReadOnly()
Return the read-only-ness of this property.