[Qt-qml] Can you access the Image element's cached QImage/QPixmap from C++ code?
T C
teeceeare97 at gmail.com
Thu Jan 13 21:23:13 CET 2011
Say your QML gui has a section with an Image element whose source points to
some internet image (http://somwhere/myphoto.jpg for example). When the
Image item is instantiated the default image provider retrieves it (in the
background maybe) and then it is painted when ready. The QImage is then
cached somewhere by the image provider using the source url as the key.
Later on I would like my C++ code to be able to save this image to permanent
storage, if the user chooses to do so. Is there a way to do this by
directly accessing the cached QImage?
I understand that I can write a custom image provider and plug that in to
the QML app context, but I really don't want to redo all the stuff that
loads remote images in background threads if I don't have to. Is there an
easier way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110113/99b744b1/attachment.html
More information about the Qt-qml
mailing list