[PyQt] Bytes values in QSettings
phil at riverbankcomputing.com
Tue Aug 23 16:42:37 BST 2016
On 20 Aug 2016, at 6:47 pm, Dmitry Shachnev <mitya57 at ubuntu.com> wrote:
> I have got a bug report in Debian  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')
> 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.
> : https://bugs.debian.org/834875
I think this is already fixed in the current snapshot.
More information about the PyQt