Add items to columns in QStandardItemModel

Viewed 11656

I am currently adding rows to my QTableView as such

QStandardItem* itm;
QStandardItemModel* model = new QStandardItemModel(this);
model->setColumnCount(2);
model->appendRow(new QStandardItem("Some Text in Column1");

How do I add items to column 2 dynamically by appending? In the above example column 2 is empty. How do I add item to column 2?

1 Answers
Related