Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, February 2007
QTreeModel


Message 1 in thread

Moin moin,

I'm happy to see the new QTreeModel in beta1, that seems to be really 
java now :). I tried to use it immediately for my problematic QTreeView 
(as seen in another thread) and it works great besides one thing:

    Is it my fault or is it the default to cache the whole tree 
immediately on startup?

I mean, what kind of model was it if it cached everything first? Or did 
i do something wrong? I'll prepare a testbench if it isn't be the default.


One thing more: It seems that javadoc has a bug, there's a 
QJambiTreeModel listed which isn't actually present.



Best regards

Georg Schild


Message 2 in thread

Georg Schild wrote:
> Moin moin,
> 
> I'm happy to see the new QTreeModel in beta1, that seems to be really 
> java now :). I tried to use it immediately for my problematic QTreeView 
> (as seen in another thread) and it works great besides one thing:
> 
>    Is it my fault or is it the default to cache the whole tree 
> immediately on startup?
> 
> I mean, what kind of model was it if it cached everything first? Or did 
> i do something wrong? I'll prepare a testbench if it isn't be the default.

It should cache one level more than what is visible. It uses this to 
decide if the node should have the '+' for child decoration. It should 
definitly not cache the whole tree.

> One thing more: It seems that javadoc has a bug, there's a 
> QJambiTreeModel listed which isn't actually present.

Definitly, the weirdest thing... I'll look into it ;-)

-
Gunnar


Message 3 in thread

Gunnar Sletta schrieb:
> It should cache one level more than what is visible. It uses this to 
> decide if the node should have the '+' for child decoration. It should 
> definitly not cache the whole tree.
Ah, ok, you know, i couldn't check the source to find it out on my own 
;). I was just a bit scared since clicking on the first node took that 
much time and afterwards everything was really fast. Wouldn't it be 
better to also have some abstract hasChildren(Object) method to 
determine if a node actually has children? This would probably produce 
less overhead than querying the node's childcount (and reduce the cache).
>> One thing more: It seems that javadoc has a bug, there's a 
>> QJambiTreeModel listed which isn't actually present.
> Definitly, the weirdest thing... I'll look into it ;-)
Seems like someone forgot to remove artefacts from refactoring? ;)



best regards

Georg Schild


Message 4 in thread

Georg Schild wrote:
> Gunnar Sletta schrieb:
> 
>> It should cache one level more than what is visible. It uses this to 
>> decide if the node should have the '+' for child decoration. It should 
>> definitly not cache the whole tree.
> 
> Ah, ok, you know, i couldn't check the source to find it out on my own 
> ;). I was just a bit scared since clicking on the first node took that 
> much time and afterwards everything was really fast. Wouldn't it be 
> better to also have some abstract hasChildren(Object) method to 
> determine if a node actually has children? This would probably produce 
> less overhead than querying the node's childcount (and reduce the cache).

Its on our todo list ;-)

-
Gunnr