code: def closeEvent( self, event ):
          
          if ( not (self.saveOnClose() and self.checkForSave()) ):
              event.ignore()
          else:
              super(XScintillaEdit, self).closeEvent(event)
docs: Overloads the close event for this widget to make sure that the data \
          is properly saved before exiting.
          
          :param      event | <QCloseEvent>