issues in using QML List View



  • How to increase the speed of loading of images in a listview in qml ........? And while scrolling, flickering of images also happen and in the first scroll images are moving very slowly.....,how to resolve this issue.......?
    Images are read from the file using some id (key) in the CSV file.This CSV file has got many attributes related to it and all these are fetched.
    As unable to upload file.Below is the code listing.

    With Thanks```

    
    * //your code here
    
     ListView {
            id: lstView
            width: parent.width;
            height: 650
            spacing: 0
            contentHeight: 600
            contentWidth: parent.width
            model: spviewModel.fnfgetmodel()//myModel
            orientation: Qt.Horizontal
            anchors.horizontalCenter: name.horizontalCenter
            anchors.bottom:  button1.top
            anchors.bottomMargin: 10
            cacheBuffer :   width*4//1000000//5000
            maximumFlickVelocity:30000
    
     delegate:                                            //delegateComponent
                Item {
                width: imageItem.paintedWidth
                height: imageItem.paintedHeight
                Image {
                    id: imageItem
                    y: 55
                    width:253
                    height: 250
                    z:10
                    fillMode: Image.PreserveAspectFit
                    anchors.left: parent.left
                    // delegate can directly use ListElement role name
                    source: model.modelData.image
                    smooth: true
                    clip: true
                }
             .....
    ........with some 15 images,60 texts,45 sliders,
    }
    
    in Cpp 
    I parse CSV and maintain a QList.In QList I am appending objects which has QProperty bindings for above data




  • @LeLev hi,

    Thank u for your reply......,is there any sample program for this scenario, its very helpful for me......,i just go through that link.....


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.