PDA

View Full Version : slot in worker thread is not called



phenoboy
1st June 2012, 12:26
Sample program can be downloaded here which describes the problem. Desperately needing help

thr_test.zip (http://phenoboy.kapsi.fi/thr_test.zip)

Problem is that signal sent from dialog is not getting called in worker thread.

I'm having a worker thread created from mainwindow and a dialog. Dialog is connected to worker thread signal and it works OK. Then I also have to send signals from dialog to workerthread but that is not working. I've read that qthread creates its own event loop in default run().

I know it has to do something with event loops but I don't know what. Please help!

phenoboy
2nd June 2012, 19:45
Ok, so I subclassed worker thread and now it works. I guest when QThread slot 'started' is called run() is not yet being called thus EventLoop is not active