zither
zither

Reputation: 41

Can't append all rows to QStandardItemModel

Here is code.

QList<QStandardItem*> items;
items.append(allData);
QStandardItemModel.appendRow(items);

But, it only set first row of items..

Upvotes: 0

Views: 294

Answers (1)

Frank Osterfeld
Frank Osterfeld

Reputation: 25155

Using appendRow() with a list of items, the items are used for the columns of a single row. If you want to have each item create a new row, use appendRows() (notice the plural).

Upvotes: 1

Related Questions