qDebug() << "before sql" << QTime::currentTime().toString("mm:ss.zzz"); QWshDatabase::SqlRecordsList data = DB->wshData(_vars["WshCode"], _vars["Filter"]); qDebug() << "after sql" << QTime::currentTime().toString("mm:ss.zzz"); qDebug() << "before model" << QTime::currentTime().toString("mm:ss.zzz"); resetModel(); _data.resize(_hHeaders.size()); if (_data.size() > 0) for (int i = 0; i < data.size(); i++) { QWshCell* newCell = new QWshCell(); int currentRow = data.at(i).value("sTag").toString().toInt() - 1; _data[currentRow].resize(_vHeaders.size()); for (int j = 0; j < data.at(i).count(); j++) newCell->setValue(data.at(i).field(j).name(), data.at(i).field(j).value().toString()); newCell->cellStyle().parseInputString(); _data[currentRow][testTagPos(data.at(i).value("tTag").toString())] = newCell; } qDebug() << "after model" << QTime::currentTime().toString("mm:ss.zzz");
before sql "16:57.813"after sql "17:04.676"before model "17:04.677"after model "17:11.416"
QVector<QVector< QPointer<QWshCell>>> _data