PDA

View Full Version : Enable/Disable a set of QActions displayed within a toolbar



schall_l
18th December 2008, 09:42
I am looking for a way to enable/disable a set of QActions displayed within a toolbar independently from their individual enable status i.e. if I disable the set of QActions everything has to be grayed out and if I enable the set of QActions every individual QAction has to be displayed grayed or not depending on it enabled status.

I was thinking to group the QActions within a QHBoxLayout and to use QHBoxLayout::setEnabled, but a QAction cannot be added to a QHBoxLayout.

schall_l
18th December 2008, 10:25
I guess QActionGroup is what I was looking for.