I am planning a Qt simulator, i.e. a GUI surface in one thread receives the signals emitted from another thread (this other thread is suspended -not resumed- while processing), while the main program is essentially just for starting the two threads. I found How to emit cross-thread signal in Qt? which works (after adding a missing semicolon), but after calling MyObject::MySlot (i.e. printing the text ""slot called"), the control goes to CThread2::exec() and is not given back CThread1::run(), which would emit further signals. It looks like its event loop keeps waiting for another event. I do not want either thread to quit: CThread1 is expected to emit a series of signals, and CThread2 is expected to process them.
What is wrong here? (the MWE is provided in the reply part of the thread above)
Another question, how a GUI surface can be moved to a thread, given that http://doc.trolltech.com/4.6/qthread.html states that "Note, however, that it is not possible to use any widget classes in the thread."