PDA

View Full Version : QTreeView - different icon sizes on sublevels?



luf
16th January 2008, 16:51
Hi

I'm wondering if anyone has done a implementation with different icon sizes on lower sublevels on a treeview?

Guess I have to subclass QTreeView, but if there was a direct way, I would do that instead...

Leif

wysota
16th January 2008, 17:18
I think it's just a matter of providing a custom delegate that will render different sizes of icons depending on the depth of the index. Of course also the sizeHint() implementation has to take that into consideration.

luf
18th January 2008, 15:42
Thanks for the reply.

Yes, it was a matter of of doing a custom delegate... and several threads on that already here, so it's now partially working... just a bit s l o w...

wysota
18th January 2008, 16:34
What exactly is slow? Do you use index widgets or persistent model indexes?