Scenario:
Say, I have a person class
Qt Code:
  1. class Person{
  2. int id; // only unique value
  3. QString name;
  4. QString address;
  5. QString age;
  6. etc etc
  7. }
To copy to clipboard, switch view to plain text mode 

The list of Person class is maintained in class called MyAllData class which is outside of my model class

The model class I am using; inherits QAbstractTableModel
Qt Code:
  1. MyCustomModelClass : QAbstractTableModel
To copy to clipboard, switch view to plain text mode 

MyCustomModelClass has a reference to the person list. The table does not display the ID number of a person. But it is the only thing with which one can identify a person separately. If I want to search my table data with ID then how can I do that?