different row heights in QTreeView
Hi,
I subclassed QTreeView and QAbstractItemModel. The editing of different datatype is implemted via QItemEditorFactory.
It works, but now I want, that the rows in the QTreeView resizes to the appropriate editor or the appropriate content. When editing row 1, just row1 should be resized...
Does somebody know a solution?
Re: different row heights in QTreeView
The correct implemenation of QStyledItemDelegate::sizeHint(const QStyleOptionViewItem &option,const QModelIndex &index) const method solves the problem.
One point is still not clear: Sometimes the model doesn't refresh the resizing immediately. Ho I can trigger the refresh-slot?
thanks
Re: different row heights in QTreeView
void QAbstractItemDelegate::sizeHintChanged ( const QModelIndex & index )