Scenario:
Say, I have a person class
class Person{
int id; // only unique value
etc etc
}
class Person{
int id; // only unique value
QString name;
QString address;
QString age;
etc etc
}
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
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?
Bookmarks