QEventLoop created in 1 thread, exec in another one and exit in the first thread
General and Desktop
2
Posts
2
Posters
4.0k
Views
1
Watching
-
Hi everyone. I'm trying to understand how QEventLoop is working.
I have one application that uses 2 threads. I create a QEventLoop in 1 thread , start the loop(exec) in the second thread, and stop(exit) it the first thread.
It shows me that the loop has been stoped, but in reallity id didn't.Now if I create The QEventLoop in the same thread as it starts(exec) and stop it from the other thread works great.
I'm interested why is happening this? why was my first example wrong, and why is the second example working?