PDA

View Full Version : menu entry which could disable all submenu entries



stella1016
11th April 2012, 17:56
I have a menu, its entry can activate or deactivate other functionalities. Now I want to group some functionalities into one menu entry, and the activate and deactivate could be done more conveniently. That is to say, click menu entry "group1" will trigger the activate or deactivate its sub entries. But its sub entries have their own activate or deactivate functionalities, as before.

Anyone knows this? Thanks.

d_stranz
11th April 2012, 18:30
Look at QActionGroup. Put all of the QAction instance that you want to be connected into a QActionGroup, and enable or disable the group. Each QAction can still be enabled or disabled independently.

stella1016
11th April 2012, 18:37
Thanks very much.
I am going to search for that.
:)

Look at QActionGroup. Put all of the QAction instance that you want to be connected into a QActionGroup, and enable or disable the group. Each QAction can still be enabled or disabled independently.