Please have a look into the following code:
CMyModel* myModel = new CMyModel(); //This is my main model sub-classing QAbstractListItemModel CMySortModel* m