12-20-2012 12:37 PM
After load database to groupdatamodel, all i can do is show in list view and get one by one record. Any body know how to change the sorted type and do the search in groupdatamodel, please help me.
12-20-2012 01:41 PM
You sort by giving a list of fields in sort order, something like:
m_departuresModel = new GroupDataModel( QStringList() << "shapeSortId" << "shape" << "departureTimestamp_1", this);
where "shapeSortId" etc are field names in your model.
There are search methods for GroupDataModel, but to be honest I've found it easier to iterate through the sorted model (my search terms are a bit complex) and test the values myself.