QImage.setAlphaChannel missing from PyQt5.QtGui

FeRD ferdnyc at gmail.com
Sat Dec 5 09:31:20 GMT 2020


Hey all,

It seems QImage::setAlphaChannel
<https://doc.qt.io/qt-5/qimage.html#setAlphaChannel> was un-deprecated in
Qt 5.15
<https://forum.qt.io/topic/121460/qimage-setalphachannel-obsolete-or-not>,
but it's missing from the 5.15.2 wheels:

>>> from PyQt5 import QtCore, QtGui>>> i = QtGui.QImage("/tmp/front3.jpg")>>> m = QtGui.QImage("/tmp/mask.png")>>> m = m.convertToFormat(QtGui.QImage.Format_Alpha8)>>> i.setAlphaChannel(m)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'QImage' object has no attribute 'setAlphaChannel'>>>
QtCore.QT_VERSION_STR'5.15.2'>>> QtCore.PYQT_VERSION_STR'5.15.2'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20201205/4ebf83bb/attachment.htm>


More information about the PyQt mailing list