code: def closeEvent(self, event):
          
          self.acqmodel.stop_listening() # close listener threads
          self.saveInputs(self.inputsFilename)
  
          # save GUI size
          settings = QtCore.QSettings("audiolab")
          settings.setValue("geometry", self.saveGeometry())
          settings.setValue("windowState", self.saveState())
          logger = logging.getLogger('main')
          logger.info('All user settings saved')
  
          self.garbage_timer.stop()
          gc.enable()
docs: Closes listening threads and saves GUI data for later use.
  
          Re-implemented from :qtdoc:`QWidget`