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

bool QInputContext::filterEvent ( const QEvent event  )  [virtual]

This function can be reimplemented in a subclass to filter input events.

Return true if the event has been consumed. Otherwise, the unfiltered event will be forwarded to widgets as ordinary way. Although the input events have accept() and ignore() methods, leave it untouched.

event is currently restricted to QKeyEvent. But some input method related events such as QWheelEvent or QTabletEvent may be added in future.

The filtering opportunity is always given to the input context as soon as possible. It has to be taken place before any other key event consumers such as eventfilters and accelerators because some input methods require quite various key combination and sequences. It often conflicts with accelerators and so on, so we must give the input context the filtering opportunity first to ensure all input methods work properly regardless of application design.

Ordinary input methods require discrete key events to work properly, so Qt's key compression is always disabled for any input contexts.

See also:
QKeyEvent, x11FilterEvent()

Definition at line 216 of file qinputcontext.cpp.

    return false;

Generated by  Doxygen 1.6.0   Back to index