Python plasmoid - can't read value from config

Aaron J. Seigo aseigo at kde.org
Tue Apr 10 13:18:13 UTC 2012


On Monday, April 9, 2012 22:01:08 Alex Dancu wrote:
> I'm trying to persist and then get back from the configuration the
> plasmoid settings. I have tried to persist first a single String
> property with no success at all in getting it back. I tried to cast -
> config.readEntry(QString('k123sensors')) but still no success.

if you are calling readConfig from the constructor, it won't work. you can only 
access your config reliably after init() is called on the applet.

furthermore, if you are running it in plasmoidviewer, then the configuration 
that is loaded is the default empty one and then the saved config is loaded. 
this helps test configChanged(), which i'm guessing you haven't implemented in 
your applet. without configChanged(), your applet will not work with desktop 
scripting, for instance.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120410/267e4410/attachment.sig>


More information about the Plasma-devel mailing list