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:

Qt Code:
  1. if (tableWidget->item(i,j) == 0)
  2. {
  3.  
  4. QTableWidgetItem *newItem = new QTableWidgetItem("some text");
  5. tableWidget->setItem(i,j, newItem);
  6. }
  7. else
  8. {
  9. tableWidgetMatrix->item(i, j)->setText("some text");
  10. }
To copy to clipboard, switch view to plain text mode