Sets whether or not this item is in an expanded state.
        
        :param      state | <bool>

def setExpanded(self, state):
        """
        Sets whether or not this item is in an expanded state.
        
        :param      state | <bool>
        """
        if (state and self.testFlag(self.ItemIsExpandable)) or \
           (not state and self.testFlag(self.ItemIsCollapsible)):
            super(XTreeWidgetItem, self).setExpanded(state)