PDA

View Full Version : How many rows can view handle (table/tree/list)



prasad_N
5th July 2015, 11:04
Hi,

I have come across below link. I am building 64-bit application on Linux, In this case How many rows my view (I am building tree) can handle ?

1. can I change default height (30) to 15 (in this case view can handle more rows than in default height case right ?)

https://bugreports.qt.io/browse/QTBUG-28631

jefftee
7th July 2015, 06:43
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!

prasad_N
7th July 2015, 10:23
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.

Actually I need to show huge data in tree view, when number of rows are more than 7 crore I have seen my application gets crashing and then when I started searching for the solution I came across this bug and just wanted to know the bearable size/number of rows view can handle, so that I can go for another approach like paging or something else.