#!/usr/bin/env python # coding: utf-8 from PyQt4.QtGui import * from PyQt4.QtCore import * rad = 5 class Node(QGraphicsEllipseItem): def __init__(self, path, index): super(Node, self).__init__(-rad, -rad, 2*rad, 2*rad) self.rad = rad self.path = path…