Getting the drawing off the main thread
Question: I remember seeing a post somewhere about being able to get the drawing in
python off the main thread, but I can't seem to find it. My first attempt goes
something like this but it doesn't work. It doesn't crash initially (it does
eventually) but no drawing takes place. The idea is that `options` is a map of
drawing functions each of which draws to a pyqtgraph, or a QTWidget, etc

    
    
    from threading import *
    from Queue import *
    
    anObject1 = DrawingObject()
    anObject2 = DrawingObject()
    anObject3 = DrawingObject()
    
    
    options = {
        0  : anObject1.drawing_func,
        1  : anObject2.drawing_func,
        2  : anObject3.drawing_func,
        3 : updateNon,
    }
    
    def do_work(item): #item is a tuple with the item at 0 is the index to which function
        #print str(item) + "\n"
        options[item[0]](item)
    
    def worker():
        while True:
            item = q.get()
            do_work(item)
            q.task_done()
    
    q = Queue()
    
    #This function is a callback from C++
    def callback(s, tuple):
        #options[tuple[0]](tuple) #this works
        q.put(tuple) #this does not
    
    
    
    num_worker_threads = 3
    for i in range(num_worker_threads):
         t = Thread(target=worker)
         t.daemon = True
         t.start()
    


Answer: My understanding is that it is not possible to draw to a QWidget outside the
main GUI thread. You can find many references to this in the Qt forums and
documentation. However, it is possible to start a subprocess that draws into
an image in shared memory, and then display the image in the main process.
This is the approach taken by `pyqtgraph/widgets/RemoteGraphicsView.py`; see
`examples/RemoteSpeedTest.py` for an example of this.

