Another option might be to define a base class derived from QWidget and DisplayElement; this base class implements your mouse event handlers. ScreenPushButton and your other GUI classes singly-inherit from this one. Be sure to include the Q_OBJECT macro in the definitions of these derived classes.
If you go the event filter route, be sure to read carefully the parts about how to handle events you -aren't- interested in. In the alternative approach I suggested, you only implement event handlers for the events you are interested in; with an event filter, you get them all. On the other hand, you can install multiple event filters on the same object, so you could potentially handle the same event in different ways.
Bookmarks