其功能是模拟弹性节点网络----节点小球在收到外力时会移动,在外力撤除后会回弹。
?..., QGraphicsScene,
QGraphicsView, QStyle)
class Edge(QGraphicsItem):#边线图形项
Pi = math.pi...):#节点小球图形项
Type = QGraphicsItem.UserType + 1
def __init__(self, graphWidget):
super...(-50, -50)
node2.setPos(0, -50)
node3.setPos(50, -50)
node4.setPos(-50, 0)...self.centerNode.setPos(0, 0)
node6.setPos(50, 0)
node7.setPos(-50, 50)
node8.