Jorge Fierro
2016-08-03 17:22:36 UTC
Hi. I've been reading through the documentation and mailing list
archives and I haven't found an authoritative and/or conclusive answer to
the following question:
What exactly is the relationship between an event loop entered by
calling QEventLoop::exec() and *the* main event loop (the one running
when you can QCoreApplication::exec())?
There are a number of related questions:
- Does QEventLoop::exec() enter *the* main event loop? Or,
- Does QEventLoop::exec() enter a different event loop independent
from QCoreApplication::exec()?
- Can QEventLoop::exec() be called outside QCoreApplication::exec()
(i.e., in a call stack that didn't originate from
QCoreApplication::exec())?
- If QEventLoop::exec() spins the main loop then any event at all can
be generated. Is this why one must use it very carefully to avoid
reentrancy issues?
Thanks.
archives and I haven't found an authoritative and/or conclusive answer to
the following question:
What exactly is the relationship between an event loop entered by
calling QEventLoop::exec() and *the* main event loop (the one running
when you can QCoreApplication::exec())?
There are a number of related questions:
- Does QEventLoop::exec() enter *the* main event loop? Or,
- Does QEventLoop::exec() enter a different event loop independent
from QCoreApplication::exec()?
- Can QEventLoop::exec() be called outside QCoreApplication::exec()
(i.e., in a call stack that didn't originate from
QCoreApplication::exec())?
- If QEventLoop::exec() spins the main loop then any event at all can
be generated. Is this why one must use it very carefully to avoid
reentrancy issues?
Thanks.