Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Image, destroy and refresh (SOLVED)
i'm a little problem with QML Image (that uses a flipable):
1 - I create an Image in the main Rectangle
2 - Flipping it, i see the background of the main rectangle (correct way)
3 - I destroy the image (before destroy it, i set opacity = 0)
4 - I recreate it in the same place
5 - Flipping it, i see the old last "image" (flipped or not depend on its state before recreation) shaped in the backgroud!
The second image works well, but it seems it doesn't refresh the background after the action taken in point .3
Anyone can help me?
thisisbhaskar last edited by
Do you mean even after replacing the old image with new image, it still shows the old image..
Can you post the code ... more specifically the part where you delete the old image and create a new image ??
itwiz last edited by
Can you please share code?Also I could not what do you mean by " but it seems it doesn’t refresh the background".
Hi, thanks for the responses...
well, when the image flip on y axis, you are able to view the container canvas...so if my background is red, during flipping i see the red color under the image...if it is the first start i see that; now if i destroy the object and than recreate it in the same place, when i flip the image i don't see the red color, but the back of the image flipped!!
The code is a bit complex: i've an array of images and with a for I destroy it!
Sorry for the wasted time!
Analyzing the cleaner, i saw that routine is never called somewhere!!!
Now it works