theImagePtr = new QImage(1000,1000,QImage::Format_ARGB32_Premultipli ed);
This is your memory leak. Your signal passes a reference to the QImage back to the main thread, not a pointer, and this new allocation never gets deleted.

pageImages= ℑ
And this line is just crazy. You're trying to assign the address of a temporary variable created in another thread to a pointer variable held by the main thread. You aren't making a copy of the image, you're making a copy of the address. When the image at that address goes out of scope (as it does in the version with line 20 commented out in renderthread.cpp) pageImages will point to deleted memory.

The proper way to do this is as they do it in the Mandelbrot example:

- create the QImage as a stack variable (not a pointer variable) in the thread class
- pass that variable (as a const reference: const QImage &) in the signal
- in your main thread slot, copy that QImage into another QImage variable (not a pointer).

And keep in mind if you have multiple render threads, they will almost certainly signal your main thread out of order, so you'll need to include a page number as part of the signal, I think.