InsertRecord performance in QSqlTableModel.
-
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