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. When using listview to display millions of data, the spacing will become larger and smaller.

When using listview to display millions of data, the spacing will become larger and smaller.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 118 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.
  • F Offline
    F Offline
    FQCD99
    wrote on last edited by
    #1
    import QtQuick 2.0
    
    import QtGraphicalEffects 1.0
    
    Item
    {
        width: 1000
        height: 1000
        MouseArea
        {
            anchors.fill: parent
            onClicked:
            {
                testListView.positionViewAtEnd()
            }
        }
        ListView
        {
            id:testListView
            width: 500
            height: 600
            model: 1000000
            delegate: listViewDelegate
        }
        Component
        {
            id:listViewDelegate
            Rectangle
            {
                width: 500
                height: 100
                color: "red"
                Text
                {
                    text: index
                    anchors.centerIn: parent
                }
            }
        }
    }
    

    There is a problem when running the above code, how should I solve this problem.

    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