C++ (Qt) QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg( (row+1) * (column+1) ) ); tableWidget->setItem(row, column, newItem);
C++ (Qt)for (int i = 0; i < rows; i++) for (int j = 0; j < cols; j++) { QTableWidgetItem * item = new QTableWidgetItem( tr("%1").arg( (i+1) * (j+1) ) ); tableWidget->setItem(i, j, item); }