[Qt-interest] QTreeView and custom QAbstractItemModel performance problem

Felix Brack fb at lte.ch
Fri Jul 9 14:42:26 CEST 2010


On 07/09/2010 11:45 AM, Sean Harmer wrote:
> On Friday 09 July 2010 10:41:08 Felix Brack wrote:
>> The thing with the row shift was my first guess too, but profiling
>> without removing the first (oldest) row has shown that every thing
>> behaves identically - poor performance and high CPU load.
>>
>> If there is really no solution to this I will give the table view a
>> chance. Doing this however would mean to surrender. Furthermore one
>> could say that Qt's TreeView is not able to manage a simple (100 to 500
>> rows) dynamically changing list with 12 columns; something I simply
>> can't believe (I have implemented this with native windows code and it
>> works without any problem even with thousands of rows); this is why I'm
>> sure that I just don't really understand the mechanics of the Qt
>> framework. I'd rather think this problem is of type 'how could I be so
>> stupid not to ...' once the solution is found.
>
> Quite. If my previous guess at hasChildren() being wrong is also wrong can you
> post a small compilable example the reproduces the problem and we can try it
> for ourselves?
>
> Cheers,
>
> Sean
I'm sorry that I can't post the real code here. If I really can't get 
any further I will have to write a brand new application which I could post.

Felix



More information about the Qt-interest-old mailing list