Hi all,

I create a QTableWidget, with a determined number of rows and collumns, now i need initialize all values in 0, i can initialize this, but is so slowly. In this moment i use this method to make it.

size = rows = collumns

Qt Code:
  1. QTableWidgetItem *tableItem;
  2. tableItem = new QTableWidgetItem();
  3. tableItem->setText("0");
  4. for(int i=0; i < size; i++){
  5. for(int j=0; j < size; j++){
  6. ui->tableWidgetMatrix->setItem(i,j,tableItem);
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

Is possible to make it diferent? Because i work with more than 500 rows and collumns!
Sorry my english, and thanks for helps!
Fernando Bottin