Event propagation in Qt
I believe the best practice is to explicitly forward the events to the base-class event method if you do not wish to filter that event type (e.g. return QObject::event(event);
) since the event function delegates events to specific handlers (e.g. QWidget::keyPressEvent
).
QCoreApplication::notify propogates events based on the return value. On true
, it considers the event as consumed and stops. Otherwise, the event is passed to the object's parent. For more information, see Events and Filters and Another Look at Events.