'Return a list of parents to this item that have child clipping enabled.'

def getBoundingParents(self):

    p = self
    parents = []
    while True:
        p = p.parentItem()
        if (p is None):
            break
        if (p.flags() & self.ItemClipsChildrenToShape):
            parents.append(p)
    return parents
