PDA

View Full Version : Model/View Programming: a question about data



QAlex
10th December 2009, 17:46
Hi,
I'm adding data in a TreeView Model. The data are of a type created by me.
The question is:
The elements of the Model must be ALL the same type???
Or is there also the possibility to insert different Types of data?

Thanks,
Alex

spirit
10th December 2009, 18:43
you can keep different type. you can declare type by using Q_DECLARE_METATYPE, in this case you can store your data in QVariant.