def arcRect(self):
self.yc,
self.h,
self.h)
def drawShape(self, painterPath):
"""
called from shape method
"""
r=self.h/2.0
x=r*math.cos(self.sa)
y=r*math.sin(self.sa)
xc, yc=self.center
x=xc+x
y=(yc+y)*-1.0
painterPath.moveTo(x, y)
painterPath.arcTo(self.arcRect(),self.startAngle/16.0,self.spanAngle/16.0)
#painterPath.moveTo(x, y)
#painterPath.addRect(self.arcRect())
def drawGeometry(self, painter, option, widget):
"""
called from the paint method
"""
#Create Arc/Circle
painter.drawArc(self.xc,self.yc ,self.h ,self.h ,self.startAngle, self.spanAngle)
def arcRect(self):
return QtCore.QRectF(self.xc,
self.yc,
self.h,
self.h)
def drawShape(self, painterPath):
"""
called from shape method
"""
r=self.h/2.0
x=r*math.cos(self.sa)
y=r*math.sin(self.sa)
xc, yc=self.center
x=xc+x
y=(yc+y)*-1.0
painterPath.moveTo(x, y)
painterPath.arcTo(self.arcRect(),self.startAngle/16.0,self.spanAngle/16.0)
#painterPath.moveTo(x, y)
#painterPath.addRect(self.arcRect())
def drawGeometry(self, painter, option, widget):
"""
called from the paint method
"""
#Create Arc/Circle
painter.drawArc(self.xc,self.yc ,self.h ,self.h ,self.startAngle, self.spanAngle)
To copy to clipboard, switch view to plain text mode
is it a qt Bug or I did something wrong ?
Bookmarks