First of all, i am brazilian therefore my english is not verry good.

I have a QTableView using QSqlQueryModel in a search screen and my table contains more than 30,000 records. I created a function to update my table. But every time I open the search screen I need to upgrade I wonder how to solve the problem! Help me please!

The code to update my table:

QString strTemp;

m_ModelProduct->clear();

m_ModelProduct->setQuery(SQL_LOCAL_PRODUCTS);

while( m_ModelProduct->canFetchMore())
{
m_ModelProduct->fetchMore();

strTemp.sprintf(" Produtos ( Processando... ) ");

m_ui->groupBoxMedicamentos->setTitle(strTemp);
}


m_ui->tableViewSearch->setModel( m_ModelProduct);

SetHeaderTables();