QQuickPaintedItem does not retain previously-drawn QImage sections
I am implementing a custom QQuickPaintedItem within a Flickable. Initially, only the visible section of the image is painted (via
painter->drawImage). As the item is flicked and new sections come into view, those get drawn as well. By the time the entirety of the item has been browsed, all parts have been drawn. However, if I now flick back to the start of the image, it stays blank unless I redraw it in my
paint()routine (which results in a discernible paint delay).
Based on the documentation, I would expect that once all sub-parts of the texture have been drawn, any further browsing within the Flickable should not require any re-painting. I have explicitly set the renderTarget to
QQuickPaintedItem::Imageand textureSize to the size of the item.
Any ideas as to why this might happen?