Scenario:
Say, I have a person class
class Person{
int id; // only unique value, NOT displayed
QString name; // displayed
QString address; // displayed
QString age; // displayed
etc etc // displayed
}
The model class I am using; inherits QAbstractTableModel - MyCustomModelClass : QAbstractTableModel
. MyCustomModelClass
has a reference to the person list. Person list is maintained in class called MyAllData
which is outside of my model class.
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?