Quote Originally Posted by yagabey View Post
Hi, thanks you were right.. It works now.. Shouldn't the indexes be same since it is "identity" proxt model ?
No. They will just have the same structure, but a QModelIndex is always directly tied to the model that created it.

There is usually very little difference when models are list or tables, since the cell can be addressed unambiguously through row and column, but once you have a tree structure, the model needs to store some model specific data in the index object to know which subtree it is working on.

QStandardItemModel is capable of being a tree model, so it does that and will then try to retrieve that additional data when getting an index as a function argument.
It very likely even checks if index.model() is equal to itself before attempting to do anything with an index.

Your test with the SQL table model worked by chance, because as a table it doesn't need to be as careful (it should though)

Cheers,
_