Thanks...
Well I am not selecting the items based on rubberbanding... just need to pick item from mouse press... so i guess items() will also doHow about just using QGraphicsScene::selectedItems()?isnt it ?
Thanks...
Well I am not selecting the items based on rubberbanding... just need to pick item from mouse press... so i guess items() will also doHow about just using QGraphicsScene::selectedItems()?isnt it ?
Yes, but is it worth it? I'd simply make items selectable using QGraphicsItem::ItemIsSelectable and then query for items selected - you'll get a much shorter list resulting in a faster application. But maybe you can simply use QGraphicsItem::mousePressEvent() and handle the interaction there? It would be best this way... There is no need to call either items(), selectedItems() nor a mouse press from the scene then.
Bookmarks