void QTableView::sortByColumn(int column)
{
Q_D(QTableView);
if (column == -1)
return;
d->model->sort(column, d->horizontalHeader->sortIndicatorOrder());
}
void QTableView::sortByColumn(int column, Qt::SortOrder order)
{
Q_D(QTableView);
d->horizontalHeader->setSortIndicator(column, order);
sortByColumn(column);
}
void QHeaderView::setSortIndicator ( int logicalIndex, Qt::SortOrder order )
Sets the sort indicator for the section specified by the given logicalIndex in the direction specified by order, and removes the sort indicator from any other section that was showing it.
就是这个函数,让你的下来的排序不行了