Using QList and QTableWidgetItem
-
I'm using QTableWidgetItem, but QList,.
@
QTableWidgetItem *textoItem;
QList <QTableWidgetItem> *listaItemsBase;
textoItem = new QTableWidgetItem;
listaItemsBase = new QList <QTableWidgetItem>;for(int x = 0;x<10;x++) { textoItem->setText(QString::number(x)); //qDebug() << "item: " << x << ": " << listaItemsBase->at(2); listaItemsBase->append(*textoItem); } for(int xy = 0;xy<listaItemsBase->size();xy++) { ui->tableWidget->setCellWidget(xy,0,listaItemsBase->at(xy)); }
@
[edit: corrected coding tags @ SGaist]