PDA

View Full Version : Emit Signal to Thread and additional Forward



CLRS530
23rd May 2010, 19:45
I have a progress window in GUI thread and a worker thread. In the class derived of QThread I run a another class which will be created in the QThread derived class.

I now have to send a signal from GUI thread to the Class in the thread. To do this I created a slot in the QThread class and forward it with a signal to the final class (I am aware that I can do it with a signal to signal connection later).
Emit to the QThread class works good but I can't emit the signal from the QThread class to second class. The slot won't be called.

The other direction works fine (emit from inner class to GUI class).
I tried to find a solution and read much about movetothread and DirectConnection Connects but nothing was really my problem case and nothing was helpful.

Note that the event handler of the thread won't be started. It runs in run() all the time.