Hi,<br><br>I&#39;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&#39;s access to applet.isUnderMouse() will cause the whole plasma desktop to crash.<br>
<br>I have confirmed that plasma won&#39;t crash if I don&#39;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(&quot;destroyed(QObject)&quot;), self.onDestroy)<br>connect(applet, SIGNAL(&quot;appletDestroyed(Plasma.Applet)&quot;), 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&#39;s handler, but it always returns false, thus helpless.<br><br>Does anybody has an idea?<br>-- <br>Best wishes<br>ZHANG Kun<br>