Hi,
I've a question...
I use QGraphicsView. I've this method on a sublcasses of QGraphicsScene:
{
if(items(event->scenePos()).last()!=0)
{
emit itemSelected(items(event->scenePos()).last());
}
}
void MPApplicationScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
if(items(event->scenePos()).last()!=0)
{
emit itemSelected(items(event->scenePos()).last());
}
}
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
Bookmarks