QEventLoop Class
The QEventLoop class provides a means of entering and leaving an event loop. More...
| Header: | #include <QEventLoop> |
| qmake: | QT += core |
| Inherits: | QObject |
Public Types
| enum | ProcessEventsFlag { AllEvents, ExcludeUserInputEvents, ExcludeSocketNotifiers, WaitForMoreEvents } |
Detailed Description
At any time, you can create a QEventLoop object and call exec() on it to start a local event loop. From within the event loop, calling exit() will force exec() to return.
See also QAbstractEventDispatcher.
Member Type Documentation
enum QEventLoop::ProcessEventsFlag
This enum controls the types of events processed by the processEvents() functions.
| Constant | Value | Description |
|---|---|---|
QEventLoop::AllEvents | 0x00 | All events. Note that DeferredDelete events are processed specially. See QObject::deleteLater() for more details. |
QEventLoop::ExcludeUserInputEvents | 0x01 | Do not process user input events, such as ButtonPress and KeyPress. Note that the events are not discarded; they will be delivered the next time processEvents() is called without the ExcludeUserInputEvents flag. |
QEventLoop::ExcludeSocketNotifiers | 0x02 | Do not process socket notifier events. Note that the events are not discarded; they will be delivered the next time processEvents() is called without the ExcludeSocketNotifiers flag. |
QEventLoop::WaitForMoreEvents | 0x04 | Wait for events if no pending events are available. |
See also processEvents().