#NEWLINE# def __init__( self , func ) : #NEWLINE# #INDENT# QThread . __init__ ( self ) #NEWLINE# self . thr_func = func #NEWLINE# self . thr_stopFlag = False #NEWLINE# self . connect ( self , SIGNAL ( 'fromMainThread(PyQt_PyObject, PyQt_PyObject)' ) , self . _fromMainThread , Qt . QueuedConnection ) #NEWLINE# self . connect ( func , SIGNAL ( 'fromMainThreadBlocking(PyQt_PyObject, PyQt_PyObject)' ) , self . _fromMainThread , Qt . BlockingQueuedConnection ) #NEWLINE# self . connect ( self , SIGNAL ( 'finished()' ) , self . _removeThread )