Hi,<br><br>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 crash.<br>
<br>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.<br><br>I tried the following signals:<br>
connect(applet, SIGNAL("destroyed(QObject)"), self.onDestroy)<br>connect(applet, SIGNAL("appletDestroyed(Plasma.Applet)"), self.onDestroy)<br>but it seems the onDestroy() method is never triggered.<br clear="all">
<br>I also tried checking applet.isDestroyed() in the timer's handler, but it always returns false, thus helpless.<br><br>Does anybody has an idea?<br>-- <br>Best wishes<br>ZHANG Kun<br>