Hi,
I've a question...

I use QGraphicsView. I've this method on a sublcasses of QGraphicsScene:

Qt Code:
  1. void MPApplicationScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
  2. {
  3. if(items(event->scenePos()).last()!=0)
  4. {
  5. emit itemSelected(items(event->scenePos()).last());
  6. }
  7. }
To copy to clipboard, switch view to plain text mode 

In my QGraphicsScene I've more than one item. One of this kinds is a subclasses of QGraphicsItem and other are QGraphicsRectItem. The QGraphicsItem item have a z value more little (for this I use the last() function of the item list obtained with the items() QGraphicsScene function).

How can I be sure that the items that I double clicked are instance of the subclasses of the QGraphicsItem and not other (QGraphicsRectItem for example)?!?

Is there any method to understand which kind of instance is a specify object?!?!

Thanks