I am brazilian, therefore my english is not very good.
Why it slows down my model when I use sort on model andn then have to again update the model?

void ProductSmartSearch::LoadTableView()
{
QString strTemp;

QElapsedTimer timer;
timer.start();

if( !m_isPopDrugStore )
m_ModelProduct->setQuery(SQL_LOCAL_PRODUCTS);
else
m_ModelProduct->setQuery(SQL_LOCAL_PRODUCTS_POP);

m_ui->tableViewSearch->setSortingEnabled(true);
m_ui->tableViewSearch->setModel( m_ModelProduct);
m_ui->tableViewSearch->model()->sort(2,Qt::AscendingOrder);
}

Every time I do a refresh on my table (call the Load function) ... runtime is very time consuming, and is only fast retreat when the method sort. The slowness happens in setModel and setQuery. Please help me!