Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Slow QListView update when using rather complex AbstractItemModel stack
Forum Updated to NodeBB v4.3 + New Features

Slow QListView update when using rather complex AbstractItemModel stack

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 461 Views 2 Watching
  • 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.
  • U Offline
    U Offline
    u19809
    wrote on last edited by
    #1

    Hi all,

    I have this rather complex Model stack
    a - first several base item models collecting data over an IP socket (so lines get appended)
    b - a set of alternative filter models that selects certain types of items of the model in a
    c - a model that combines several filter models in to one (filter models can come from different base models
    d - serveral Identity models which 'blacks out' certain rows of the model c

    each of the models in 'd' are shown in separate QListViews.

    What is the problem ?

    1- when say +100K rows are collected (in total so not visualized) everything breaks down to a crawl (100% cpu and hung windows). If an set 'setUniformItemSizes' to 'false' things get worse. However if I set it to 'true' the width of the listview is not calculated propery and hence messages get truncated. To fix this i hacked a long SizeHintRole in model at level c. This shows the lines. More ideal would be that I could use 'fitToContent' but that is not supported by a listview
    2. My listviews are presented horizontally split by a splitter. However no horizontal scrollbars get shown.

    So

    How can I speedup
    What about the horizontal scrollbar

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      When getting big models, one thing that is usually done is to use a rolling window of top of your data to avoid loading everything at all time so you only keep a reduce set of data in memory and to paint.

      Hope it helps.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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