'Set the items `path` (:class:`QPainterPath`).'

def setPath(self, path):

    if (not isinstance(path, QPainterPath)):
        raise TypeError(("%r,    'QPainterPath'    expected" % type(path)))
    if (self.__path != path):
        self.prepareGeometryChange()
        self.__path = QPainterPath(path)
        self.__boundingRect = None
        self.update()
