I am facing serious issues while scolling ListView when there is costly delegate. When i am scrolling listview, its jerky.
Some once please help on this.
Here is my sample code
/LIstview with some dummy costly delegate, I tried using loader to load the delegate then its a bit better but still its jerky/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Window 2.2
ApplicationWindow {
visible: true
width: Screen.width
height: Screen.height
ListView {
width: Screen.width
height: Screen.height
model: 500
spacing: 10
highlightMoveVelocity: 50
flickDeceleration: 500
delegate: Loader{
asynchronous: true
sourceComponent: Image {
width: Screen.width
asynchronous: true
height: index %2 === 0 ? 500: 200
source: "file:///home/Downloads/4k.jpg"
///Just for show
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
Image {
anchors.fill: parent
asynchronous: true
source: "file:///home/Downloads/4k.jpg"
}
}
}
}
}