ビューで楕円を描く
2016/12/13
Python2.7.10, PyQt4.11.3
class MyScene(QtGui.QGraphicsScene):
def __init__(self,parent):
super(MyScene, self).__init__(parent)
def drawEllipse(self,cx,cy,size):
pen = QtGui.QPen()
qc = QtGui.QColor()
qc.setNamedColor('#000000')
pen.setColor(qc)
self.addEllipse(cx-size/2,cy-size/2,size,size,pen)