code: def export_profile(self):
          
          file_name_dialog = QFileDialog(self)
          file_name_dialog.setAcceptMode(QFileDialog.AcceptSave)
          file_name_dialog.setNameFilter(self.tr('JSON files (*.json *.JSON)'))
          file_name_dialog.setDefaultSuffix('json')
          file_name = None
          if file_name_dialog.exec_():
              file_name = file_name_dialog.selectedFiles()[0]
          if file_name != '' and file_name is not None:
              self.minimum_needs.write_to_file(file_name)
docs: Export minimum needs to a json file.
  
          This method will save the current state of the minimum needs setup.
          Then open a dialog allowing the user to browse to the desired
          destination location and allow the user to save the needs as a json
          file.