code: def accept(self):
          
          self._result = 1
          
          if not self.signalsBlocked():
              self.accepted.emit()
          
          if self.autoCloseOnAccept():
              self.close()
docs: Emits the accepted signal and closes the popup.