On July 13, 2010 22:46:52 Nate C wrote: > Is there any equivelent to QGraphicsWidget::closeEvent for a plasma > applet. I need to shutdown a QThread on the close event, but can not > figure anything out. Plasma::Applet subclasses QGraphicsWidget, so > should I not get it for free? (I am using the python bindings.)
you mean when the applet is removed? well, it's destroyed then, so I assume making it the parent of the qthread would ensure the qthread is also destroyed... ohhh, but "Note that deleting a QThread object will not stop the execution of the thread it represents" - so... in C++ I would have the applet's destructor stop the qthread (except, I can't remember if the qthread's destructor will have been called before or after that)... alternatively, there's the destroyed() signal. not sure which'd be easier in python. _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel