Hi
I have a model where for each item I have Multiple Text Strings for display. Sortingdoesn't seem to work when I have multiple Strings. But works when i have a single String.
Here is my Code:
QStringList data;
QStandardItem *item = new QStandardItem();
data.clear();
data << "ABC" << "DEF" ;
item->setData(QVariant(data), Qt:isplayRole);
MyStandardModel->insertRow(0);
MyStandardModel->setItem(0,item);
StandardModel->sort(0,Qt::AscendingOrder);
So here Sorting doesn't work on Model, but if I change:
data << "ABC" << "DEF" ; to data << "ABC" ;
Sorting Works.
Same is the Case while Filtering using Sort FilterproxyModel Applied on it.
Could someone please tell me where am I going wrong or the changes I need to make to sort()
Thanks
Bookmarks