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

Qt-interest Archive, January 2007
Re: QGraphicsView and layers


Message 1 in thread

Fabian Hohmuth wrote:
> The second approach would give me the visibility management, but I'm
> reluctant to misuse a non-drawing item (the layer) as a parent for
> drawing items. I can also see issues with bounding box, contains() etc.

Invisible helper items are a very nice way to solve this problem. You get
everything you want from a layer, and all you need to do to switch the
stacking order is to change the layer items' Z value. Non-drawing items are
the cheapest kind of items to maintain.

Andreas

-- 
 [ signature omitted ]