Animation on changing image source
I have this QML:
property int count_img_attuale:0
anchors.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...
I would use onCount_img_attuale to set a new state with all transformations you want, including the source of immagine ;) !
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 )