Related to PyQt 4.6.1

When deleting/removing a sub classed QGraphicsLineItem:
Qt Code:
  1. self.scene().removeItem(item)
  2. del item
To copy to clipboard, switch view to plain text mode 

the function
Qt Code:
  1. def __del__(self):
  2. print "I am dead"
To copy to clipboard, switch view to plain text mode 
is not getting called.

How do I call a function when a graphic item is going to delete?