Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. issues in using QML List View
Forum Updated to NodeBB v4.3 + New Features

issues in using QML List View

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 654 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nateshN Offline
    nateshN Offline
    natesh
    wrote on last edited by
    #1

    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
    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      @natesh hi,
      have you seen this page ? http://doc.qt.io/qt-5/qtquick-performance.html

      1 Reply Last reply
      1
      • nateshN Offline
        nateshN Offline
        natesh
        wrote on last edited by
        #3

        @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.....

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved