code: def saveSettings(self):
          
          self.settings.beginGroup('mainwindow')
          self.settings.setValue('geometry', self.saveGeometry())
          self.settings.setValue('windowstate', self.saveState())
          self.settings.setValue('path_to_ramp_file', self.path_to_ramp_file)
          self.settings.setValue('path_to_load_mot_file',
                                 self.path_to_load_mot_file)
          self.settings.endGroup()
docs: Save window state to self.settings.