code: def saveSettings(self):
          
          self.settings.beginGroup('rampviewer')
          self.settings.setValue('geometry', self.saveGeometry())
          self.settings.endGroup()
docs: Save window state to self.settings.