View Full Version : Scale dependent display of graphics Item

18th February 2011, 00:32
Hi I'm fishing for ideas on how to tackle a problem.

I'm developing a mind-mapping application with PyQt and QtOpenGL. At the moment I can do a few hundred nodes in a nested tree like structure with a total of 3-4 thousand QGraphicsItems ... at this point it starts to get unwieldy, both in performance and visual impact

I'm looking to scale this up by a factor of 10 or so and a really nice way of avoiding clobbering the user with information overload is to use scale. The deeper an item is nested the smaller it is. This would be brilliant for performance too if I can switch off the display of an item if its too small in a view

What would be the best way to do this? If possible I want to avoid overriding something that gets called really often like paint(), and I don't want to traverse the tree doing size calculations if I can help it.

Any ideas?