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

David M. Cotter dave at kjams.com
Mon Oct 25 21:20:39 CEST 2021


> You are mixing and confusing windows native Win32 messages with Qt signals.
am I?

the doc here for "nativeEvent()" <https://doc.qt.io/qt-5/qwidget.html#nativeEvent> specifically states that this is intended to give you windows messages (WM_*) (on windows)

to wit:
"receive native platform events identified by eventType"

Platform:		Event Type Identifier:		Message Type:
Windows		"windows_generic_MSG"	MSG *

note that i'm getting all kinds of OTHER "WM_" messages there, just not the ones i'm interested in.

> You are making the incorrect assumption that the Qt core internals are based on Windows native widgets.
yes well, that's true. my understanding is that Qt uses native widgets whenever possible. seemed to me that Menus would be a prime candidate for that

> That is your mistake.
okay, so what you're saying is that, you know for a fact that the menu bar in a windows app built by Qt does not use native windows APIs for that? is that definitely true?

> Instead look into QMenu::aboutToShow and QWidget::closeEvent
does that work for the ENTIRE menu bar browsing workflow?

ie: get a "start" message when the user clicks the first time in the menu bar, and the user can then browse through all available menus if they like, and when they're done, whether they click OFF the menu bar (choosing no menu item) or if they do happen to pick a menu item, then i get one "finished" event message?

cuz that's what i need.

> Your solution (if it worked) would only work on Windows
that's all i care about. no other platform necessary.

-dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20211025/0e79db8b/attachment.html>


More information about the Interest mailing list