[PyQt] A possible bug in PyQt when loading Boolean values via QSettings

Xavion xavion.0 at gmail.com
Sat Dec 25 11:15:29 GMT 2010

This used to work fine when my PyQt code was in Python v2 syntax.  I was
using 'QVariant' when saving Boolean values and 'toBool()' when loading

Now that I've upgraded my code to Python v3 syntax, 'QVariant' is gone and I
possibly shouldn't need to use 'bool()' either.  Given that Python wants to
receive 'False' when loading Boolean values, why is it saved to the
configuration file as 'false'?

If this can't be avoided, surely 'QSettings' can be improved to assume that
'false' really means 'False', at least when importing from Linux
configuration files.  What's your opinion about this idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101225/9af77286/attachment.html>

More information about the PyQt mailing list