In the last line of your code, in the connect
method, I believe you have a typo in your code
self.connect(self.mapper, QtCore.SIGNAL("mapped(int)"), self.removeItem(),
QtCore.SIGNAL("clicked(int)"))
should be
self.connect(self.mapper, QtCore.SIGNAL("mapped(int)"), self.removeItem,
QtCore.SIGNAL("clicked(int)"))
Having self.removeItem()
in the connect method will actually try to call the self.removeItem method
rather than providing the subsystem an address to connect the function
As finmor suggests, you should look at new syntax signals and slots as they will dramatically help to clarify your code and make it more Pythonic.