03-10-2013 09:05 PM
I am trying to make a listview data model subclass. I am looking at source examples and had a couple of questions.
1. What is the difference between using QListDataModel<QVariantMap> and QVariantListDataModel?
2. Do you have to use typedef or is this only for readability?
03-10-2013 09:31 PM
1. QVariantListDataModel is defined as:
bb/cascades/databinding/qlistdatamodel.h: typedef QListDataModel<QVariant> QVariantListDataModel;
2. typedefs are only for readability.
You can safely pass QListDataModel<QVariant> to a function expecting QVariantListDataModel, and so on.
03-10-2013 09:44 PM
03-10-2013 09:50 PM
Ok. Thanks. Missed the map part. I am looking at the bucket list example and the bucket model uses QListDataModel<QVariantMap> and when you generate a list with context example app, it uses QVariantListDataModel. I am trying to understand the difference and when to use the correct one.