[Qt-qml] Image Provider

Adriano Rezende adriano.rezende at openbossa.org
Wed Mar 31 20:03:44 CEST 2010


Hi,

> Images are already loaded in a separate thread, so I'm not sure I understand the problem you're solving.

Are you talking about setting asynchronous property to every image?
This is not exactly what I want. I want to load all images once,
regardless the objects that uses that images are loaded or not. So
after the splash screen, no image loading would be necessary if the
cache is big enough.
And also I would like all core images to be ready when the object is
presented, no async loading, to avoid the screen to behave like an
html page being loaded.

> Ultimately the image has to be a QPixmap, and those can only be created in the main (GUI) thread, so there is no way currently to avoid this copy.

Yes I know, my loader does the same thing that QDeclarativePixmapCache
does. The transformation isn't the problem, I was talking about the
memory issues in using the provider API. Since I would have to
maintain a list of QImages that eventually would be converted
(duplicated) to a QPixmap in the main thread.

I don't feel uncomfortable with the current solution, I was just
wondering if there is a better one. The downside is that I wouldn't be
able to visualize it with the qml viewer.


Cheers,
Adriano



More information about the Qt-qml mailing list