PDA

View Full Version : QTreeView with QAbstractItemModel slow



Qiieha
6th December 2012, 20:06
Hi guys,
I use a subclass of QAbtractItemModel and QTreeView to edit big xml files. It works fine, but today I noticed, that the app gets very slow, if the xml file is too big.

Then I debugged a little bit and noticed, that the index method i called everytime. Even if I move the mouse over the view.

What's wrong? What can I do. There are 400 items and it is slow. What, if there are 5000 items?

Please help me...thanks

Qiieha
7th December 2012, 09:06
After optimizing rowCount- and data-method and implementing hasChildren-method the view works like a charm = )