Figured it out with the help of http://zetcode.com/tutorials/pyqt4/firstprograms/

I just had to rename my function to "closeEvent", and then connect to it:
Qt Code:
  1. self.connect(self, Qt.SIGNAL('triggered()'), self.closeEvent
  2.  
  3. def closeEvent(self, event):
  4. print "Closing"
  5. self.destory()
To copy to clipboard, switch view to plain text mode