QAbstractEventDispatcher Class
The QAbstractEventDispatcher class provides an interface to manage Qt's event queue. More...
| Header: | #include <QAbstractEventDispatcher> |
| qmake: | QT += core |
| Inherits: | QObject |
Public Types
| struct | TimerInfo |
Detailed Description
An event dispatcher receives events from the window system and other sources. It then sends them to the QCoreApplication or QApplication instance for processing and delivery. QAbstractEventDispatcher provides fine-grained control over event delivery.
For simple control of event processing use QCoreApplication::processEvents().
For finer control of the application's event loop, call instance() and call functions on the QAbstractEventDispatcher object that is returned. If you want to use your own instance of QAbstractEventDispatcher or of a QAbstractEventDispatcher subclass, you must install it with QCoreApplication::setEventDispatcher() or QThread::setEventDispatcher() before a default event dispatcher has been installed.
The main event loop is started by calling QCoreApplication::exec(), and stopped by calling QCoreApplication::exit(). Local event loops can be created using QEventLoop.
Programs that perform long operations can call processEvents() with a bitwise OR combination of various QEventLoop::ProcessEventsFlag values to control which events should be delivered.
QAbstractEventDispatcher also allows the integration of an external event loop with the Qt event loop.
See also QEventLoop, QCoreApplication, and QThread.