[PyQt] Faster transparency from a QImage?
chemikhazi at gmail.com
Tue Jun 17 21:17:00 BST 2008
Is there a faster way to draw transparency on a QWidget from a QImage
other than converting the QImage to a pixmap and setting that as the
mask? I'm trying to have a 3d window draw into PyQt, the window output
is going in fast enough but getting the alpha of the 3d window into
the mask is being way too slow for my purpose. My paint event:
def paintEvent(self, event):
#print "Should draw yes?"
data = self.pandaTexture.getRamImage().getData()
img = QtGui.QImage(data, self.pandaTexture.getXSize(),
self.paintSurface.drawPixmap(0, 0, self.desktopBg)
self.paintSurface.drawImage(0, 0, img)
pixmap = QtGui.QPixmap.fromImage(img)
More information about the PyQt