InsertRecord performance in QSqlTableModel.
General and Desktop
5
Posts
3
Posters
2.7k
Views
1
Watching
-
Dear all,
@if (file.open(QIODevice::Readonly))
{
while (!file.atEnd()){
QString str = file.readLine();
QStringList strList = str.split("\t"); //parsing tab separated file
QSqlTableModel.insertRecord(0,makeRecord(strList)); //makeRecord returns QSqlRecord
}
}@That cause serious performance problem. It takes 1 min to parse about 20K lines of file. What's wrong with that code?
Thanks