Animation on changing image source
-
Hi all,
I have this QML:
@
...
property int count_img_attuale:0
...
Image {
id: immagineanchors.fill: parent source: "file:" + fileNameList[count_img_attuale] }
...
...
@when I change the value of count_img_attuale I get a new Image showing.
Is there a way to animate the new Image showing?
I'm thinking on a fade in and fade out or similar... -
Hi,
Once you change something in @"file:" + fileNameList[count_img_attuale]@, new image will be loaded and you won't be able to make fade out animation. So you need "double buffering" - two Image elements on same place.
When count_img_attuale is changed set back one to new source and start parallel animations for opacities of two images ( old one from 1 to 0 and new one from 0 to 1 )