'Set the items outline `pen` (:class:`QPen`).'

def setPen(self, pen):

    if (not isinstance(pen, QPen)):
        pen = QPen(pen)
    if (self.__pen != pen):
        self.prepareGeometryChange()
        self.__pen = QPen(pen)
        self.__boundingRect = None
        self.update()
