[Qt-interest] QTableView vs QTreeView
Andreas Pakulat
apaku at gmx.de
Fri Sep 3 20:38:19 CEST 2010
On 03.09.10 10:41:03, David Boosalis wrote:
> I am currently using QTreeView to display data as a table. Why I am using a
> QTreeView was that when I started the project over a year ago I did not
> like how the standard QTableView looked and interacted with the user (Cell
> focus versus row focus of the QTreeView). I am looking at ways to increase
> performance of my windows. A user might have 20 or more of these QTreeView
> windows open. Each window getting data from a socket and then doing a
> resort. All this sorting and appending of new data on these windows is
> taking up as much as 50% of the cpu with just ten windows.
> Will I get a significant speed up if I switch to a QTableView. (I do set
> the flag on my QTreeView for a uniform size) . There is a Commercial table
> offered by ICS, that looks really nice. Does anyone know if this has any
> speed enhancements to it over a normal QTableView.
Even if the rows are uniform in height QTreeView still has to do more
calculations than a QTableView. So it might be faster to use that,
should be easy to check.
Also important is to add as many rows as possible at once, instead of
adding each row individually to the model.
Andreas
--
Beware of a tall blond man with one black shoe.
More information about the Qt-interest-old
mailing list