[Interest] win: can't trap WM_ENTER/EXITMENULOOP?

David M. Cotter dave at kjams.com
Mon Oct 25 23:32:13 CEST 2021


> I'm just guessing here, but it might be that the menu bar's events don't get delivered to the QMainWindow.
they do, just not the events i want

> Or, perhaps this documented caveat is important: "Note: Events are only delivered to this event handler if the widget has a native window handle."
the widget does in fact have a native window handle (it is the main window)

> You might be able to catch the events if you use QCoreApplication::installNativeEventFilter
i had tried that too

but what i've discovered since is that on windows, Qt's implementation of the menu bar does NOT use native windows widgets, they're all custom drawn.  hence we won't get any native windows menu bar messages.

-dave


More information about the Interest mailing list