Oh, you are more like a consultant?
It has been said in other threads. Namely here:http://www.qtcentre.org/forum/f-qt-p...-gui-7322.html, starting from post 15.Could you expand on what it means to "move the thread into its own context?"
But here goes again:
You create the worker thread in the GUI thread. No problem so far.
You connect a signal from the GUI thread to a slot from the worker thread.
Here is the problem, since the signal will actually be posted as an event in the thread's event loop.
But actually, since the thread is owned by the GUI thread, the event processing for it will take place in the GUI thread. Therefore the slot will actually be executed in the context of the main thread.
By calling moveToThread from the GUI thread, you guarantee that any events posted in the thread will get executed in the thread's event handler.
Regards
Bookmarks