I have done some debugging .I tried to catch key press event in the scene .The keyPressEvent() handler got the event if I pressed 'P' for example ,but I didnt seem to be called when I pressed Del .
As I have said before ,the default view does something just for up,down,left and right keys .
If it was up to the items .....how would they do it? They cant delete themselves ,and there is not deletelater() or stuff for items.....
So I think it must be the scene ,but ...
I am really confused.void QGraphicsScene::keyPressEvent ( QKeyEvent * keyEvent ) [virtual protected]
This event handler, for event keyEvent, can be reimplemented in a subclass to receive keypress events. The default implementation forwards the event to current focus item.
Edit: Yes Patrik ,I think I have seen a thread where you posted talking about deleting items too....but I think I dont need to do that .I just need to know when they are going to be deleted (how are they deleted when you press del).
Bookmarks