[PyQt] QSettings.value() returns string instead of bool

Andreas Pakulat apaku at gmx.de
Sun Mar 6 12:49:16 GMT 2011


Hi,

I'm using sip API v2 for QVariant here and using
QSettings.setValue/value does not work correctly for booleans. See the
attached two scripts. In write.py everything looks good, I can store and
get back a Python boolean. But running read.py which only reads from the
QSettings object always returns a string instead of a boolean value. It
almost looks like the wrong QSettings overload is being called...

My versions are:
Qt4: 4.7.1
PyQt4: 4.7.3
Python: 2.6.6
Sip: 4.10.2

Is this something thats fixed in newer PyQt4 versions maybe?

Andreas



More information about the PyQt mailing list