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()
Tryst
  • 313
  • 1
  • 6
  • 12

1 Answers1

2

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

Angie Quijano
  • 4,167
  • 3
  • 25
  • 30
Luck
  • 141
  • 1