code: def accepted(self):
          
          model = self._previewTableView.model()
          if model is not None:
              df = model.dataFrame().copy()
              dfModel = DataFrameModel(df)
              self.load.emit(dfModel, self._filename)
              print(("Emitted model for {}".format(self._filename)))
          self._resetWidgets()
          self.accept()
docs: Successfully close the widget and return the loaded model.
  
          This method is also a `SLOT`.
          The dialog will be closed, when the `ok` button is pressed. If
          a `DataFrame` was loaded, it will be emitted by the signal `load`.