I'm baffled by this one. I tried moving the QPainter
to it's own def
as some have suggested, but it gives the exact same error. Here's the def
I created.
def PaintButtons(self):
solid = QtGui.QPixmap(200, 32)
paint = QtGui.QPainter()
paint.begin(solid)
paint.setPen(QtGui.Qcolor(255,255,255))
paint.setBrush(QtGui.QColor(255, 0, 0))
paint.drawRect(0, 0, 200, 32)
paint.end()