torres
4th April 2011, 20:02
I have a class that inherits QStyledItemDelegate. I override the following methods:
QWidget *createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
void setModelData( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const;
void setEditorData ( QWidget * editor, const QModelIndex & index ) const;
Is it possible to retrieve the QTreeWidgetItem on which the user clicked in the createEditor method of the delegate?
Thanks in advance
QWidget *createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
void setModelData( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const;
void setEditorData ( QWidget * editor, const QModelIndex & index ) const;
Is it possible to retrieve the QTreeWidgetItem on which the user clicked in the createEditor method of the delegate?
Thanks in advance