Hi,

I have a simple data model that basically encapsulates a std::vector with data. Data only exists in this vector, and the vector can potentially grow very large.

Now I have implemented canFetchMore() and fetchMore() in so far, that I just keep an integer with the current size, and override the two fetch methods basically like so


Qt Code:
  1. canFetchmore() { return current_size < rowCount(); }
  2. fetchMore() { current_size = std::min(current_size + 1000, rowCount()); }
To copy to clipboard, switch view to plain text mode 


I thought this might take some pressure of the GUI.


But now that I think about it some more, Qt is probably smart enough to do something like this on its own. I am thinking now the fetch-more stuff only applies when I am fetching data in a very costly manner, say from SQL DB, not when I have it all here in a std::vector.


Is this thinking right, or does it make sense to override the fetch methods like I did?