I am not sure why you are using an event filter when all you really need to do is override the QWidget::event() method in your main window class to look for TouchBegin events. When you detect a touch, if the menu is not visible, you show it, if it is visible, you hide it. The menu itself will handle its own touch events and will hide itself when an action is triggered.

Event filters are generally used when you want one QObject to spy on what is happening in another QObject, not to monitor events within a QObject itself.

Also, why are you deriving Menu from QWidget and not QMenu?