Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QCoreApplication::EventFilter QCoreApplication::setEventFilter ( QCoreApplication::EventFilter  filter  ) 

Sets the event filter filter. Returns a pointer to the filter function previously defined.

The event filter is a function that is called for every message received in all threads. This does not include messages to objects that are not handled by Qt.

The function can return true to stop the event to be processed by Qt, or false to continue with the standard event processing.

Only one filter can be defined, but the filter can use the return value to call the previously set event filter. By default, no filter is set (i.e., the function returns 0).

See also:

Definition at line 1959 of file qcoreapplication.cpp.

Referenced by QX11EmbedContainer::QX11EmbedContainer().

    EventFilter old = d->eventFilter;
    d->eventFilter = filter;
    return old;

Generated by  Doxygen 1.6.0   Back to index