RubyTigerSG
10th April 2011, 03:15
Hi Gurus,
Can anybody tell me what is wrong with this code?
QHash<QString, double> results = ReturnResults();
int row = 0;
QHashIterator<QString, double> i(results);
while (i.hasNext()) {
i.next();
QVariant key;
key = i.key();
QTableWidgetItem *newLine = tblResult->item(row,0);
newLine->setData(Qt::UserRole,key);
cout << i.key() << ": " << i.value() << endl;
row++;
}
Any help will be much appreciated.
RT
Can anybody tell me what is wrong with this code?
QHash<QString, double> results = ReturnResults();
int row = 0;
QHashIterator<QString, double> i(results);
while (i.hasNext()) {
i.next();
QVariant key;
key = i.key();
QTableWidgetItem *newLine = tblResult->item(row,0);
newLine->setData(Qt::UserRole,key);
cout << i.key() << ": " << i.value() << endl;
row++;
}
Any help will be much appreciated.
RT