Quote Originally Posted by Santosh Reddy View Post
As I see it, as far as adding a virtual column is concerned both QIdentityProxyModel and QAbstractItemModel just the same, you will need to implement index(), columnCount(), mapToSource(), mapFromSource(), data() and setData().
The point is your ProxyModel implementation returns invalid indices for the source model. QIdentityProxyModel is made friend of QAbstractItemModel which lets it call createIndex() on its behalf.

I don't think you can rely on the QIdentityProxyModel's mapToSource() and mapFromSource() as they not aware of the extra column we added
You can extend the existing implementation. The point is what I wrote above -- QIdentityProxyModel is friend of QAbstractItemModel so it can return proper indexes for the source model. QAbstractProxyModel can't thus a subclass of QAbstractProxyModel will not either but a subclass of QIdentityProxyModel will.