I tried this:
Qt Code:
  1. [...]
  2. i1 = QtGui.QPixmap('qtg_aircraft.png')
  3. i2 = QtGui.QPixmap('qtg_locked.png')
  4.  
  5. alpha = QtGui.QPixmap(QtCore.QSize(24, 24))
  6. alpha.fill(QtCore.Qt.transparent)
  7.  
  8. result = QtGui.QPixmap(QtCore.QSize(24, 24))
  9.  
  10. painter = QtGui.QPainter(result)
  11.  
  12. brush = QtGui.QBrush(QtCore.Qt.SolidPattern)
  13. brush.setColor(QtGui.QColor(QtCore.Qt.transparent))
  14.  
  15. painter.setBrush(brush)
  16.  
  17. painter.drawPixmap(QtCore.QRect(0, 0, 24, 24),
  18. alpha,
  19. QtCore.QRect(0, 0, 24, 24))
  20.  
  21. painter.drawImage(QtCore.QRect(0, 0, 24, 24),
  22. i1.toImage(),
  23. QtCore.QRect(0, 0, 24, 24))
  24. [...]
To copy to clipboard, switch view to plain text mode 

But it do not work... any other idea ?