What is the difference between the toggled and triggered signals in QAction? I don’t know when to use one over the other or how they relate.
Moreover, in the documentation for the triggered signal, what does “activated” mean? Is it the same as getting focus?
Thank you…
The difference lies in what type of widget the action is associated with. For example, the toggled signal applies when you have an action connected to a (binary) checkbox. It lets you know whenever the checkbox has been changed from ‘on’ to ‘off’ or ‘off’ to ‘on. The triggered signal, however, applies to transient actions without the requirement that there be an ‘on’ and ‘off’ state (i.e. clicking on a menu item or clicking a button). The usage of ‘activated’ vs. ‘triggered’ here is not important, you can think of them as synonyms for a signal without this extra state.