|  | Home · Overviews · Examples

# QAbstractEventDispatcher Class Reference
[com.trolltech.qt.core module]

The `QAbstractEventDispatcher` class provides an interface to manage Qt's event queue. More...

Inherits `QObject`.

## Detailed Description

The `QAbstractEventDispatcher` class provides an interface to manage Qt's event queue.

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 create your instance before you create the `QApplication` object.

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. For example, the Motif Extension Qt Solution includes a reimplementation of `QAbstractEventDispatcher` that merges Qt and Motif events together.

See also `QEventLoop` and `QCoreApplication`.