Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
ujwalapatil
Posts: 3
Registered: ‎12-28-2012
My Device: BB10 Dev Alpha
My Carrier: Blackberry

What is the difference between QlistDataModel and GroupDataModel ?

When we should use QlistDataModel. 

Please use plain text.
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: What is the difference between QlistDataModel and GroupDataModel ?

[ Edited ]

GroupDataModel and ArrayDataModel are the most often used ones.

GroupDataModel has built-in sorting functionality.

 

QListDataModel is similar to ArrayDataModel but operates on concrete items, not QVariants. Item type is specified as a template parameter. Item type which is supplied as template parameter must be convertible to QVariant.

 

In most cases ArrayDataModel can be used instead of QListDataModel.



Check the details here:

Sorted data models:
https://developer.blackberry.com/cascades/documentation/ui/lists/groupdatamodel.html

Unsorted:
https://developer.blackberry.com/cascades/documentation/ui/lists/arraydatamodel.html

QListDataModel:

https://developer.blackberry.com/cascades/reference/bb__cascades__qlistdatamodel.html


Andrey Fidrya, @zmeyc on twitter
Please use plain text.