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

Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

How to load images asynchronously to the listview

Hi all,


Is there any sample available to load images to the listview asynchonously. 

Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to load images asynchronously to the listview

Take a look at this...



If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: How to load images asynchronously to the listview

[ Edited ]


An example, but it will probably require a lot of tweaking (caching and reusing the processed images etc):



Smiley Happy




One of the problems with this class is that it creates QNetworkAccessManager for every image.

So, it will not throttle the requests and will start loading all the images at the same time. This won't work for large number of images. It also leaks memory. It's not  production-ready.


void ImageLoader::load()
        m_loading = true;
        emit loadingChanged();

        QNetworkAccessManager* netManager = new QNetworkAccessManager(this);



Andrey Fidrya, @zmeyc on twitter