I'm working with a QMainWindow and would like every widget within it to become disabled. Since we're talking about practically the entire GUI, i'm looking for a way to disable it all in one sweep instead of going through all the children one-by-one (there are a bunch of child widgets!).

Since QMainWindow is a subclass of QWidget, i was hoping that the setEnabled(bool) and setDisabled(bool) slots would work. Unfortunately, they doesn't seem to.

Is there a way of doing this simply or am i trying to squeeze blood from a stone?

thanks!