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. TableView lazy load & Virtual Mode
QtWS25 Last Chance

TableView lazy load & Virtual Mode

Scheduled Pinned Locked Moved Solved QML and Qt Quick
tableviewlazyloadvirtualmode
2 Posts 2 Posters 1.8k 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.
  • DongD Offline
    DongD Offline
    Dong
    wrote on last edited by Dong
    #1

    I'm trying to display a lot of data in TableView.
    What I want is Lazy load with Virtual Mode in TableView.

    • Lazy Load (Or load on demand) : I want the TableView's model only store about 90 items (3 pages * 30 items)

      • When scroll down : The items about the View port will be remove & load more items at the end.
      • When scroll up : The items under the View port will be remove & load previous items at the begin.
    • Virtual Mode: I want the Scrollbar show

      • Max value : Total items in database (about 100,000)
      • Current value : The current "Virtual" scroll value regardless to the real TableView's model items (maximum is 90)
    • I'm tried to set rowCount => but it is readonly

    • I'm search for Virtual Mode but not a clue.

    • I'm think of custom the TableView but I don't know where to start (I'm a newbie with QT)

    PS: I'm use QT 5.4.2 MinGW

    Anyone can help me? Any sample or suggestion would be great !!!
    Many thanks !!!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alexander_Lanin
      wrote on last edited by
      #2

      If you use a QAbstractListModel the data() will be accessed on demand only (tested).
      TableView will reuse delegates when scrolling up/down and not create new ones (according to description)

      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