[Interest] Possible to track all executed Actions?

Bo Thorsen bthorsen at ics.com
Tue Oct 29 07:17:00 CET 2013

Den 28-10-2013 10:19, Philipp Kursawe skrev:
> I would like to log all executed QActions in a global way without having
> a QActionManager or the like that every component in the app has to use.
> Is that possible in Qt?

No, there is no way to do this if you only use QAction.

There are several things you can do, though. One possible solution is to 
subclass QAction and log all triggered() signals. This works well if you 
have code building your UI, but not with designer.

I guess you could hack moc or uic. This could give you exactly what you 
want. And IMHO this would be the worst possible solution.


Bo Thorsen, European Engineering Manager, ICS
Integrated Computer Solutions. Delivering World-Class Applications

More information about the Interest mailing list