[PyQt] Bytes values in QSettings
Dmitry Shachnev
mitya57 at ubuntu.com
Sat Aug 20 18:47:12 BST 2016
Hi,
I have got a bug report in Debian [1] complaining about storing bytes
values in QSettings.
I tested it myself and indeed it does not seem to work (with PyQt v5.7,
sip v4.18.1):
$ python3
Python 3.5.2+ (default, Aug 7 2016, 13:57:22)
>>> from PyQt5.QtCore import QSettings
>>> s = QSettings('foo')
>>> s.setValue('baz', b'bytestring')
>>> s.sync()
QVariant::save: unable to save type 'void*' (type id: 31).
Wrapping the value in a QByteArray does work correctly.
Is that expected behavior or a bug?
The bug report says it is a recent regression, however I got the same
with PyQt v5.6. I did not test with earlier sip versions, though.
[1]: https://bugs.debian.org/834875
--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160820/8a12e585/attachment.sig>
More information about the PyQt
mailing list