Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
When does the model resolve data?
Peppy last edited by Peppy
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?
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