cannot convert memoryview to QByteArray
Kovid Goyal
kovid at kovidgoyal.net
Sun Sep 1 10:09:13 BST 2024
Converting a memoryview created froma bytes object to QByteArray fails:
python -c 'from PyQt6.QtCore import QByteArray; QByteArray(memoryview(b"a"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
BufferError: memoryview: cannot cast to unsigned bytes if the format flag is present
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
More information about the PyQt
mailing list