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. When does the model resolve data?
QtWS25 Last Chance

When does the model resolve data?

Scheduled Pinned Locked Moved General and Desktop
model view prog
2 Posts 2 Posters 769 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.
  • P Offline
    P Offline
    Peppy
    wrote on 23 Sept 2015, 17:15 last edited by Peppy
    #1

    Hello guys, I do wonder how the model (QAbstractItemModel) works, because it loads data after it's been set to the (any) view. How and when the model asks for data? Let's say, data are handled from the network, but, is there any kind of lazy loading behind the scenes?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Sept 2015, 20:21 last edited by
      #2

      Hi,

      It depends on your implementation. Generally speaking, you trigger the whatever is needed to grab the data over the network and once you have it you populate your model and if done correctly, this will trigger the machinery that will make all view aware that new data are available and they should update.

      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

      2/2

      23 Sept 2015, 20:21

      • Login

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