code: def saveToObject(self):
          
          for i in range(self.ui.caleditorStack.count()):
              try:
                  self.ui.caleditorStack.widget(i).saveToObject()
              except AttributeError:
                  logger = logging.getLogger('main')
                  logger.debug('index {} does not have method saveToObject'.format(i))
docs: Saves the current UI setting to the model