def boundingRect(self):
"""
Computes the bounding recatangle for every edge
"""
if not self.source() or not self.dest():
return QtCore.QRectF()
return QtCore.QRectF(self.sourcePoint,
QtCore.QSizeF(self.destPoint.x() - self.sourcePoint.x(),
self.destPoint.y() - self.sourcePoint.y()))
评论列表
文章目录