tags:

views:

31

answers:

1

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()
+1  A: 

Hi there! It was just a typo. You're using Qcolor (the first occurrence). Changing that to QColor will do the trick. :)

Luck