My initial problem was to allow the main window to refresh during heavy computation that couldn't be broken into smaller chunks. Based on information from wysota, that item is resolved - the computation is in its own thread, and the main thread continues to process events.

The problem now is that, if the main thread is killed, I haven't been able to cleanly kill the computation thread. I've tried numerous combinations of catching the QCloseEvent and calling terminate() on the thread, QApplication::closeAllWindows(), ::exit(), etc.

I'm using a Win32 console window during development (via AllocConsole()) and one thing I noticed is that the console window's "x" stops all the threads. Is there a straightforward platform independent way to obtain that effect in Qt?

Thanks in advance!
Martin