signal not emitting from run() in multi-threaded app:
here is my code bits:
_threadCopy.cpp
void ThreadCopy::run()
{
ThreadCopy::fileObj.copy();
}
fileObj is object of _File and copy is its function, any signal outside Copy method is being emitted but any signal inside copy method / function, is not emiited...
e.g, updateProgress() signal is not emiited which is inside copy() with following code:
_file.cpp
emit updateProgress(currentSize);
i tried to make my question concise thats why didn't put up whole code but i am sure there is nothing wrong with code since it was working fine before i ran it without QThread implementation.
i am sure i am missing some information about QThread that i need to know....also i tried to uuse moveToThread with following code
main.cpp:
ThreadCopy *t;
_File* F;
t=new ThreadCopy(*F,(fcpy.count()));
F->moveToThread(t);
t->start();
t->wait();
any help?thanks
Bookmarks