Disable children (shortcuts) of a qmenu
-
Disabling a QMenu does not disable its children QActions
(at least in my case. maybe its because im using nested QAction's and QMenu's)
The user could still open a QAction accidentally by pressing its active shortcut.
I want to prevent this by disabling all children or at least those which have active shortcuts, if a QMenu is disabled.
Whats the best approach to do this, if you dont have easy access between the QMenu and the single QAction to solve it with a single slot ?Should i just loop through all of children?
Does findChildren() / children() give me nested child, which is not part of the first level children?edit: i found my solution here:
https://askcodes.net/coding/how-to-iterate-through-a-menu-s-actions-in-qt- -
Hi,
Are these actions associated only to the QMenu ?
Can you provide a minimal compilable example that shows this behaviour ?