TypeError: QImage.sizeInBytes() is a private method
Florian Bruhin
me at the-compiler.org
Fri May 22 11:20:34 BST 2020
Hi again,
With Qt 5.10, QImage::byteCount() got deprecated and replaced by
QImage::sizeInBytes():
https://doc.qt.io/qt-5/qimage-obsolete.html#byteCount
https://doc.qt.io/qt-5/qimage.html#sizeInBytes
However, calling it from PyQt doesn't seem to work:
>>> from PyQt5.QtGui import QImage
>>> img = QImage()
>>> img.sizeInBytes()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: QImage.sizeInBytes() is a private method
Not sure why this happens, as sizeInBytes() is under "public:" in qimage.sip...
This is with Python 3.8.2, PyQt5 5.14.2, PyQt5-sip 12.7.2 and sip 4.19.22 on
Archlinux.
Florian
--
me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org
https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200522/b88b83e4/attachment.sig>
More information about the PyQt
mailing list