On Sat, 25 Dec 2010 22:15:29 +1100, Xavion <[email protected]> wrote: > 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 > them.
In other words your application was explicitly saying how the value should be interpreted. > 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'? It's saved as a string if the backend can only save strings. It's saved as "false", rather than "False", probably because it's the obvious value for a C++ developer to use. > 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? A completely invalid assumption that can easily break existing applications. Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
