in the end, it's the same, but I'm simplifying code by eliminating itab an reading directly from item.
I agree with wath you said about cell validation, to me its all correct.
Just a side note, for writing cell content I usually do a pattern like this:
if (tableWidget->item(i,j) == 0)
{
tableWidget->setItem(i,j, newItem);
}
else
{
tableWidgetMatrix->item(i, j)->setText("some text");
}
if (tableWidget->item(i,j) == 0)
{
QTableWidgetItem *newItem = new QTableWidgetItem("some text");
tableWidget->setItem(i,j, newItem);
}
else
{
tableWidgetMatrix->item(i, j)->setText("some text");
}
To copy to clipboard, switch view to plain text mode
Bookmarks