code: def restore_geometry_state(self, gs):
          
          if not gs:
              return
          if gs.get('geometry', None):
              self.restoreGeometry((gs['geometry']))
          if gs.get('state', None):
              self.restoreState((gs['state']))
docs: Restore the position of the main window and the docks.
  
          The gui widgets need to be recreated first.
  
          This function can be called in `on_show()`.