code: def error(self, message):
          
          QMessageBox.critical(self, _("Array editor"), message)
          self.setAttribute(Qt.WA_DeleteOnClose)
          self.reject()
docs: An error occured, closing the dialog box