Exchange data between qt thread and c++ thread
-
Hi,
Created Qt thread from c++ thread (not main thread and strand) and am ablne to pass the data through signal/slot to Qt thread. But, I could not pass data back from Qt thread to c++ thread. Any ideas?
thanks.
av. -
Hi,
To utilize the signal/slot the classes MUST be subclass of QObject. Without it, it will not work. The Qthread you made is probably lucky that the C++ is his parent, so it will connect to that, but giving data back means that the C++ thread should have an QObject part running, which it doesn't so it will not handle the events.