Problems about plasmoid's destroy event

Kun Zhang arthur.kun at
Sat Feb 26 03:10:09 CET 2011


I'm writing a plasmoid with Python. I have a QTimer to do refresh stuff and
it works fine, unless I remove the plasmoid from desktop and the timer's
access to applet.isUnderMouse() will cause the whole plasma desktop to

I have confirmed that plasma won't crash if I don't start the timer, so I
think if I could stop the timer before the plasmoid is being destroyed, the
crash can be prevented.

I tried the following signals:
connect(applet, SIGNAL("destroyed(QObject)"), self.onDestroy)
connect(applet, SIGNAL("appletDestroyed(Plasma.Applet)"), self.onDestroy)
but it seems the onDestroy() method is never triggered.

I also tried checking applet.isDestroyed() in the timer's handler, but it
always returns false, thus helpless.

Does anybody has an idea?
Best wishes
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Plasma-devel mailing list