code: def import_profile(self):
          
          # noinspection PyCallByClass,PyTypeChecker
          file_name_dialog = QFileDialog(self)
          file_name_dialog.setAcceptMode(QFileDialog.AcceptOpen)
          file_name_dialog.setNameFilter(self.tr('JSON files (*.json *.JSON)'))
          file_name_dialog.setDefaultSuffix('json')
          path_name = resources_path('minimum_needs')
          file_name_dialog.setDirectory(path_name)
          if file_name_dialog.exec_():
              file_name = file_name_dialog.selectedFiles()[0]
          else:
              return -1
  
          if self.minimum_needs.read_from_file(file_name) == -1:
              return -1
  
          self.clear_resource_list()
          self.populate_resource_list()
          self.switch_context(self.profile_edit_page)
docs: Import minimum needs from an existing json file.
  
          The minimum needs are loaded from a file into the table. This state
          is only saved if the form is accepted.