[PyQt] Re: PyQT lost reference (was: Re: PyKDE: KConfigSkeleton not writing configuration)

Till Gerken till.gerken at gmail.com
Fri Mar 13 10:15:41 GMT 2009


Hi,

sorry for keeping replying to myself, but nobody else seems to show
interest and I am trying to find the root cause of the error:

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.

Looking at the SIP file I see the following:

KCoreConfigSkeleton::ItemString*  addItemString (const QString& name,
QString& reference, const QString& defaultValue = QLatin1String(""),
const QString& key = QString());

Could it be that this method declaration misses /In/ and /Out/ for
QString &reference? The documentation on /In/ and /Out/ was not too
clear for me, could someone elaborate what happens exactly when these
statements are given?

Thanks,

Till


More information about the PyQt mailing list