def mousePressEvent(self, event):
self.unhighlight()
scenePos = self.mapToScene(event.pos())
from .mouse_actions import MouseGrabber
if self.isInConnectionPoint():
MouseGrabber(self._graph, scenePos, self, 'Out')
elif self.isOutConnectionPoint():
MouseGrabber(self._graph, scenePos, self, 'In')
# def paint(self, painter, option, widget):
# super(PortCircle, self).paint(painter, option, widget)
# painter.setPen(QtGui.QPen(QtGui.QColor(255, 255, 0)))
# painter.drawRect(self.windowFrameRect())
评论列表
文章目录