[Qt-qml] how to reload qml Image
jingzhe.yu at nokia.com
jingzhe.yu at nokia.com
Thu Oct 28 10:07:16 CEST 2010
Hi,
I have a Image element in my QML, and I use my own ImageProvider as the source, my ImageProvider is a plugin.
Image {
Id: foregroundImage
Source: "image://ownimageprovider/foreground
sourceSize.width: mainWidget.imageWidth
}
My ownimageprovider generate dynamic QImage for Image element, but I don't know how to reload image when image is changed.
I tried to use a stupid way to do: add sourceSize.width property. When I know image is changed from my c++ code, I emit "imageWidthChanged" signal(by increase image width to 1, or minus 1, human cannot see the difference if image size is changed 1 pixel), then image is reloaded. But this solution is not working all the time, only work in some times.
Do you know there is better and robust solution for this?
Brs,
Jingzhe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101028/d8ddf1d1/attachment.html
More information about the Qt-qml
mailing list