[PyQt] GUI thread check

Frédéric frederic.mantegazza at gbiloba.org
Sat Jan 17 09:01:10 GMT 2009


On samedi 17 janvier 2009, David Boddie wrote:

> >     threading.currentThread().getName()
> >
> > The main thread is called 'MainThread'.
>
> It may be called that now, but is it always guaranteed to have that
> name?

True. The solution is to named it before launching the Qt main loop:

    threading.currentThread().setName("QtMainThread")

-- 
    Frédéric

    http://www.gbiloba.org



More information about the PyQt mailing list