PDA

View Full Version : How to recognize if QGraphicsItem is currently showed in QGraphicsView



radek.z
12th February 2009, 10:32
Hi,
I have a lot of items in scene.
Is there possibilities, what item are currently visible, when changing the sceneRect?
Does QGraphicsItem has such a property?

Radek

talk2amulya
12th February 2009, 10:44
From QT Assistant



bool QGraphicsItem::isVisible () const
Returns true if the item is visible; otherwise, false is returned.
Note that the item's general visibility is unrelated to whether or not it is actually being visualized by a QGraphicsView.

radek.z
12th February 2009, 10:53
Note that the item's general visibility is unrelated to whether or not it is actually being visualized by a QGraphicsView.
Yeah, thats what I mean. I need to know, what item are currently in visible part of scene. If there is some properties? So far I do it through list of items in current sceneRect, but this is not the best way.
Radek