The PySide.QtCore.QEventLoop class provides a means of entering and leaving an event loop.
At any time, you can create a PySide.QtCore.QEventLoop object and call exec() on it to start a local event loop. From within the event loop, calling PySide.QtCore.QEventLoop.exit() will force exec() to return.
| Parameters: | parent – PySide.QtCore.QObject | 
|---|
Constructs an event loop object with the given parent .
This enum controls the types of events processed by the PySide.QtCore.QEventLoop.processEvents() functions.
| Constant | Description | 
|---|---|
| QEventLoop.AllEvents | All events. Note that DeferredDelete events are processed specially. See QObject.deleteLater() for more details. | 
| QEventLoop.ExcludeUserInputEvents | 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 PySide.QtCore.QEventLoop.processEvents() is called without the ExcludeUserInputEvents flag. | 
| QEventLoop.ExcludeSocketNotifiers | Do not process socket notifier events. Note that the events are not discarded; they will be delivered the next time PySide.QtCore.QEventLoop.processEvents() is called without the ExcludeSocketNotifiers flag. | 
| QEventLoop.WaitForMoreEvents | Wait for events if no pending events are available. | 
| QEventLoop.DeferredDeletion | deprecated - do not use. | 
| Parameters: | flags – PySide.QtCore.QEventLoop.ProcessEventsFlags | 
|---|---|
| Return type: | PySide.QtCore.int | 
| Parameters: | returnCode – PySide.QtCore.int | 
|---|
Tells the event loop to exit with a return code.
After this function has been called, the event loop returns from the call to exec() . The exec() function returns returnCode .
By convention, a returnCode of 0 means success, and any non-zero value indicates an error.
Note that unlike the C library function of the same name, this function does return to the caller – it is event processing that stops.
See also
QCoreApplication.quit() PySide.QtCore.QEventLoop.quit() exec()
| Return type: | PySide.QtCore.bool | 
|---|
Returns true if the event loop is running; otherwise returns false. The event loop is considered running from the time when exec() is called until PySide.QtCore.QEventLoop.exit() is called.
See also
| Parameters: | flags – PySide.QtCore.QEventLoop.ProcessEventsFlags | 
|---|---|
| Return type: | PySide.QtCore.bool | 
| Parameters: | 
 | 
|---|
Tells the event loop to exit normally.
Same as exit(0).
Wakes up the event loop.
See also