Do not use QActionGroup to pass menu/toolbar actions from plugin
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The way you create custom menus and toolbars in plugins right now is that you subclass QActionGroup and add a set of actions to the group in the constructor.
The problem with this approach is that it can interfere with the toggling of the actions. Action groups are used to establish groups of actions that should behave as radio buttons or enabled and shown together.
Problem 1: If you set any of the actions to be checkable it will not immediately work as expected. Instead, it will check on but never check off. That is because it is part of an action group and Qt expects another action to be hit before turning it off. You can get around this by calling setExclusive(false) on the QActionGroup, but it still adds a lot of confusion to the user (it sure did for me and my colleagues).
Problem 2: If you actually want your actions in a group, you cannot do this because the plugin is forcing them all to be in a same group. There is no workaround for this except to put each group in a different toolbar, which may not be desirable.