code: def qteStopRecordingHook(self, msgObj):
          
          # Update status flag and disconnect all signals.
          if self.qteRecording:
              self.qteRecording = False
              self.qteMain.qteStatus('Macro recording stopped')
              self.qteMain.qtesigKeyparsed.disconnect(self.qteKeyPress)
              self.qteMain.qtesigAbort.disconnect(self.qteStopRecordingHook)
docs: Stop macro recording.
  
          The signals from the event handler are disconnected and the
          event handler policy set to default.