[Qt-interest] Which Action?

MARTIN Pierre hickscorp at gmail.com
Tue Sep 27 00:00:25 CEST 2011


> In the actionTriggered() function I need to know which action triggered the call.
> Is there a way to get that information in the actionTriggered() function?
Also, i suggest you look at the QMenu triggered(QAction*) signal, which sends a pointer to the QAction which has been triggered here:
http://doc.qt.nokia.com/latest/qmenu.html#signals
And i believe instead of connecting each individual action to a slot, you just connect the parent menu to a slot which will be called whatever action is triggered.

Pierre.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110927/42c0bc29/attachment.html 


More information about the Qt-interest-old mailing list