code: def emit_accepted(self):
          
          if self.result():
              filename = self.selectedFiles()[0]
              if os.path.isdir(os.path.dirname(filename)):
                  self.dlg_accepted.emit(filename)
docs: Sends signal that the file dialog was closed properly.
  
          Sends:
          filename