tableview is not update ?
Unsolved
General and Desktop
-
i am not sure what happend.
my program need sort part of lines in tableview, and i use function : moveSection. but it is not work .....
i found that index is not change after moveSection .
my code :for(int ii = startIdx; ii <= endIdx; ii++) { for(int j = startIdx; j <= (endIdx - 1) ;j++) { if(model->item(j, m_s)->data(Qt::UserRole + 2).toDouble() > model->item(j + 1, m_s)->data(Qt::UserRole + 2).toDouble()) { ui->optionsView->verticalHeader()->moveSection(j, j + 1); qApp->processEvents(); } }
how to sort part of lines in tableview ?
-
Hi,
If you want to do sorting on your views, you should rather consider QSortFilterProxyModel or implement your own QAbstractProxyModel.