QTreeView is very slow when inserting big amount of data. In some cases, it is 
possible to achieve big speedup in case of wixed-height treeviews.

I.e., in QTreeView calculating of item height is very slow. If we have fixed 
height (fixed font, no editors), we can not calculate this height, but return 
constant.

However, QTreeView has "int QTreeView::indexRowSizeHint(const QModelIndex & 
index) const [protected]" function, which is not virtual.
Why QTreeView introduces new  function that returns row size hint, but doen't 
reimlements "int QAbstractItemView::sizeHintForRow ( int row ) const [virtual]"?

In fact, this virtual function is not reimplemented at all. Is this some 
architecture requirement, or just a bug (2 functions with same logic, but 
different implementation)? I can override QAbstractItemView::sizeHintForRow 
function and in some cases people would be able to achieve big performance 
boost by reimplementing it.

Ivan
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to