[Qt-qml] how to reload qml Image

jingzhe.yu at nokia.com jingzhe.yu at nokia.com
Fri Oct 29 09:56:07 CEST 2010


Hi,

Bea's solutions works better, I made a error report.
http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-230

Jingzhe


-----Original Message-----
From: Lam Bea (Nokia-MS-Qt/Brisbane) 
Sent: Friday, October 29, 2010 07:50
To: Yu Jingzhe (Nokia-MS/Oulu)
Cc: qt-qml at trolltech.com
Subject: Re: [Qt-qml] how to reload qml Image

Hi Jingzhe,

On 28/10/2010, at 6:07 PM, ext jingzhe.yu at nokia.com wrote:

> 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.

There is no straightforward way to do this at the moment. The only way to force a reload would be to modify the image url to ensure a new image is requested from the image provider - for example, by appending some unique number that then is ignored by the image provider.

This is something that should be fixed. Could you file a bug at http://bugreports.qt.nokia.com to track this issue?


regards,

Bea





More information about the Qt-qml mailing list