'Set the widget creation policy
Parameters
policy : WidgetManager.CreationPolicy'

def set_creation_policy(self, policy):

    if (self.__creation_policy != policy):
        self.__creation_policy = policy
        if (self.__creation_policy == WidgetManager.Immediate):
            self.__init_timer.stop()
            while self.__init_queue:
                state = self.__init_queue.popleft()
                self.__materialize(state)
        elif (self.__creation_policy == WidgetManager.Normal):
            if ((not self.__init_timer.isActive()) and self.__init_queue):
                self.__init_timer.start()
        elif (self.__creation_policy == WidgetManager.OnDemand):
            self.__init_timer.stop()
        else:
            assert False
