I am having trouble updating cells in QTableWidget...below is the snippet
//fileds are qstringlist and they are not null//
//qDebug() << "my item " << myitem->text();
// resultTable is the QTableWidget from UI form
ui->resultTable->setItem(row, i, myitem);
//fileds are qstringlist and they are not null//
QTableWidgetItem *myitem = new QTableWidgetItem(fields[i]);
//qDebug() << "my item " << myitem->text();
// resultTable is the QTableWidget from UI form
ui->resultTable->setItem(row, i, myitem);
To copy to clipboard, switch view to plain text mode
The above code is in a loop to update the table. I am not sure where I am going wrong or is it a bug?
I am on Windows Vista with Qt SDK v2010.04(Open source)
Any help would be appreciated.
BTW this a sample program (Trip planner from Networking section) from C++ GUI Programming with QT 4 2nd edition
Bookmarks