
Originally Posted by
foggy-mind
First problem:
The 2'nd column has data which is int type, and sorting is something like that [1,10,11,...,2,21,...] I need that numbers will be sorted [1,2,...,10,11,...,21,...]
use
item->setValue(query->record().value("ltr_cust_code").toInt());
itemModel->setItem(row, 1, item);
item = new QStandardItem;
item->setValue(query->record().value("ltr_cust_code").toInt());
itemModel->setItem(row, 1, item);
To copy to clipboard, switch view to plain text mode
if all your entries are integers...
Bookmarks