code: def enableBranch(self, enabled):
          
          self.enabled = enabled
  
          # Disabled children and further descendants
          enabled = enabled and self.data != self.childrenDisabledValue
  
          for child in self.childItems:
              child.enableBranch(enabled)
docs: Sets the enabled member to True or False for a node and all it's children