PDA

View Full Version : QStandardItemModel: copy and append



davisjamesf
19th September 2007, 15:21
Hi,

I have two different QStandardItemModels filled with data. I want to create a new QStandardItemModel and append or add to it with the copies of the two QStandardItemModels I have. Do I have to loop through the data of the two I already have to add to the new QStandardItemModel, or is there an easier, more efficient way of doing this?

(using Qt4.3.0)

Thanks
James

wysota
19th September 2007, 16:23
You have to loop and copy (clone) items. If you didn't want copies, you could provide a proxy model that wrapped two or more models to create a single unified model.