Hi all.

I have a QTreeView hooked up with an implementation of QAbstractItemModel, and the view has a custom delegate set up for one of the columns. I've set it up to open these delegate editors persistently in the following way:

1. Model is populated with data. When it encounters a row that needs a delegate, it notifies the owner and passes on the index in question.
2. The owner stores a QPersistentModelIndex with the given index for later use.
3. Once the model is fully populated, it notifies the owner of this. The owner then goes through each stored index and calls openPersistentEditor() on the view for each one.
4. (If the model data is cleared or re-populated from this point, it will call closePersistentEditor() on each index beforehand and clear them.)

This worked seemingly perfectly, until I installed an implementation of QSortFilterProxyModel for filtering purposes. I tried to change the calls to openPersistentEditor() and closePersistentEditor() to first map the index from source, since the view now uses the proxy model instead, but nothing seems to happen. I can still get the editors to open by double-clicking in the cells, but I cannot make them persistent anymore. I've stepped through as much as I can of the Qt function calls to see if anything is obviously wrong without much luck.

Am I missing something here? Or maybe my way of thinking is entirely wrong?

Any help would be greatly appreciated.

Regards,

skauert