[Qt-qml] The behavior of image status in ListView delegates

Adriano Rezende adriano.rezende at openbossa.org
Mon Sep 6 15:23:16 CEST 2010


> image.status == Image.Ready. If I then scroll the delegate out of view
> and back again, the load is instantaneous but the image goes through the
> same status sequence, even if it is already in the internal application
> cache.

Hi,

The image goes from Loading to Ready all the times?
I don't see this behavior. What version of Qt you are using? (Try Qt 4.7 RC1)

But testing your case I've found another bug... When the image is
already in cache, the statusChanged signal is emited twice with the
same status (Ready).

I've added a bug in JIRA with a patch that solves this problem:
http://bugreports.qt.nokia.com/browse/QTBUG-13436

But I've found another strange behavior. I don't know if it's an
expected one or if it's just a bug. When statusChanged is emited,
there is no check if the status really changed or not on the load
method (see QDeclarativeImageBase::load()). So if you have an image
that is ready and sets another one that is already in cache (so it's
ready too - sync) statusChanged is emited even if the status didn't
changed at all. What happens is that the two images are ready, what
just changed are the image content, not the element status. This
behavior also happens for progressChanged signal.

Probably a lot of people are using statusChanged and progressChanged
to check for content changes, but in my opnion this is a strange
behavior, since I wouldn't expect these signals to be emited
redundantly. Maybe adding a signal contentChanged should be more
clear.

Br,
Adriano



More information about the Qt-qml mailing list