Hi,
I use QSqlTableModel to access table stored in database,when I traverse and handle every row in one table which contains about 3500 rows, i find it need 3-4 seconds that is too slow. Is it normal and how to improve it?
here is my code,
Qt Code:
int GetRecordCount()ï½› while(sqlTableModel.canFetchMore()) ï½› sqlTableModel.fetchMore(); ï½ return sqlTableModel.rowCount(); ï½ //traverse table for (i=0 ï¼›i<=GetRecordCount()ï¼›i++) ï½› //... //... ï½To copy to clipboard, switch view to plain text mode
Bookmarks