1 /** Some generally useful Qt utils. */
4 /***** FocusObserver *****/
6 bool FocusObserver::eventFilter(QObject
*obj
, QEvent
*event
)
8 if (event
->type() == QEvent::FocusIn
)
9 focusIn(static_cast<QWidget
*>(obj
));
10 else if (event
->type() == QEvent::FocusOut
)
11 focusOut(static_cast<QWidget
*>(obj
));
12 return QObject::eventFilter(obj
, event
);