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
Highlighted
Developer
Posts: 163
Registered: ‎04-28-2012
My Device: BlackBerry 9800
My Carrier: BlackBerry

QListDataModel sample application?

Hi,

 

     Anyone can provide me the sample application for creating a listview using  QListDataModel.I want to create a imagelistview and those images should be downloaded from url.In the qml i have created a listview and using ListItemData property i want to set the image for the list item.I tried with GroupDataModel stored the image in QVariantMap along with other strings i did not save the images in the filesystem.If i store those files in the filesystem then i am able to show those images in the listview .I read in the documentation that this  model will show the items in the listview if it is convertible to QVariant.Please provide me the sample application using QListDataModel.

 

Regards,

Naresh Kodumuri/

Developer
Posts: 121
Registered: ‎11-19-2008
My Device: Not Specified

Re: QListDataModel sample application?

The bucketlist sample application uses QListDataModel: http://developer.blackberry.com/cascades/sampleapps/

You can also download it from GitHub: https://github.com/blackberry/Cascades-Samples

 

Developer
Posts: 136
Registered: ‎01-25-2010
My Device: Z30, Z10, Q10, Dev Alpha B & Bold 9900
My Carrier: Bell

Re: QListDataModel sample application?

[ Edited ]

To load your image from a URL, you can look @ the following project..

https://dl.dropbox.com/u/25981400/web_image_example.zip

I used it in my projects and it works very nicely, the component is pretty slick Smiley Happy This was taken from the following post...

http://supportforums.blackberry.com/t5/Cascades-Development/Will-ImageView-ImageTracker-support-web-...

 

There is a variant, which I can't recall that uses caching... This will avoid pulling the images each time. If you can garantee the image never changes, this is a great add-on to avoid costly data pull.