Re: How many rows can view handle (table/tree/list)
Simple answer, QTableView, QTreeView, and QListView can handle way more items than you should attempt to display using the model/view paradigm IMHO. The view of course only has to manage the number of items visible in the view, and the scollbar, which will become useless if your model returns a large number for rowCount.
Even though QAbstractItemModel can do lazy loading, scrolling through tens of thousands of results is not user friendly IMHO and certainly not hundreds of thousands, millions, or billions of items. If your model is intelligent, it will store only items visible in the view, or perhaps 3 pages worth of items (previous page of items, current page, and next page of items), etc. But scrolling through a huge result set, even with lazy loading intelligently performed by the model is not a user interface I'd like to be stuck with.
It's not uncommon for applications that have huge datasets to provide search only results on the dataset and even then, may limit search results to a reasonable number of results. If the search is too generic, return an error and require more specific search criteria, etc. Your search criteria may include date ranges, item property values, keywords, etc. but should require the user to produce search criteria that only returns a manageable set of results IMHO.
Rather than try to max out the theoretical limits of what the Qt model/view classes can support, I would suggest that you rethink your user interface so that it provides a better user experience.
Hope that helps, good luck!
I write the best type of code possible, code that I want to write, not code that someone tells me to write!
Bookmarks