On Freitag, 13. März 2009, Till Gerken wrote:

> The QString() that I am passing as reference to the C++ class
> KCoreConfigSkeleton exists as local variable in my Python class
> derived from KCoreConfigSkeleton. Now any code that interacts with
> KCoreConfigSkeleton (C++ or Python) may change this QString instance.

this is because QString() is mutable while python strings are immutable.
When dealing with KCoreConfig, do not use QString as local variables,
always convert explicitly from/to python strings.

I wonder what happens with this when the QString will be eliminated
in PyQt4 as announced. That might break code which relies on 
QString being mutable.

See my message

http://www.mail-archive.com:80/[email protected]/msg16594.html

-- 
Wolfgang

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to