[SOLVED] How I can set QTableWidget cells?



  • I have a QTableWidget, with 2 colums, and n row.
    How I can fill the cells?

    I wrote this code, but didnt work.

    @QTableWidgetItem *newItem = new QTableWidgetItem;
    newItem->setText(list[i]);
    ui->tableWidget->setItem(row, 0, newItem);
    ++row;
    ui->tableWidget->update();@



  • [SOLVED] :D

    I added this line and worked.
    @ ui->tableWidget->insertRow(row);@

    Google is my best friend :D


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.