On Fri, Mar 27, 2009 at 10:14 AM, Darren Dale <dsdal...@gmail.com> wrote:
> I have a simple question about QThread. The attached simple example > illustrates a case where I have a widget that creates and holds a reference > to a thread, setting itself as the parent. I need the parent to hold a > reference to the thread, so I can interrupt its execution for example. I > want to delete the thread when it finishes executing. > > What the script demonstrates is that when the widget catches the thread's > finished signal and deletes its reference to the thread, the thread > continues to persist until the widget itself goes out of scope. Is this due > to a cyclic reference? Can anyone suggest what I have done wrong, how I can > improve it? > > I see my mistake. the thread's parent be None instead of the widget. Darren
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt