Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Does QQuickImageProvider use QPixmapCache ?

$
0
0
IIRC, changing the source explicitly evicts the image element from the cache, so you want to avoid that as much as possible. What you want is to create one Image element for each of the sources and alternate between which one is visible: true. For instance: // ImageFlipper.qml Item {     id: root     property int index: 0;     Image { source: "source1.png"; visible: root.index == 0 }     Image { source: "source2.png"; visible: root.index == 1 }     Image { source: "source3.png"; visible: root.index == 2 }     Image { source: "source4.png"; visible: root.index == 3 }     Image { source: "source5.png"; visible: root.index == 4 } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles