Well, reading the thread it seems that options are:
1. changing the "source" property, which feels like a hack if used directly.
2. setting cache=false and calling sourceChanged(), but it was not clear
from the thread if this works or not.
3. implementing a custom item to replace Image, which feels like an
overkill for this.
I ended up writing a NameStore in C++ which serves the names used for
"source" and can then redirect those as I wish. It is convenient in
that it act as a central broker, "touching" an image will cause all
linked Image elements to update.
Regards,
Harri
On 10/03/2015 11:49, Daniel França wrote:
So I think this discussion can help you:
http://forum.qt.io/topic/6935/how-to-reload-an-image-in-qml/3
Em ter, 10 de mar de 2015 às 11:47, Harri Pasanen <ha...@mpaja.com
<mailto:ha...@mpaja.com>> escreveu:
Exactly: I want QML Image to have a refresh() method that will
force it to reload the image.
One use case: let's say I have a jpg on disk that I'm showing in QML.
If I edit the image in an external application and save it again
with the same name,
I'd like to be able to reload the image without changing the
source name.
Harri
On 10/03/2015 11:34, Daniel França wrote:
What exactly you want to do?
Em ter, 10 de mar de 2015 às 11:26, Harri Pasanen
<ha...@mpaja.com <mailto:ha...@mpaja.com>> escreveu:
Hi,
Is there a way to force QML image to refresh, other than
changing its
"source" property?
Thanks,
Harri
_______________________________________________
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest