PyQt: Create QPixmap with alpha channel and not premultiplied color channels
问题 I would like to create a QPixmap to draw on using a QPainter. The QPixmap should support transparency without using premultiplied color channels. Currently I do this by creating a QPixmap with the desired dimensions and filling it with a QColor that has been set to zero for each channel (including alpha). tex = QtGui.QPixmap(width, height) c = QtGui.QColor(0) c.setAlpha(0) tex.fill(c) This adds transparency to the QPixmap. However, if I draw to the QPixmap using a QPainter, the drawn color