Disabling widgets
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
There seems to be no correct way to disable (gray out) widgets that are not considered in certain states of a module.
I actually use the pqAutoGeneratedObjectPanel class and use findChild() for finding the corresponding QWidget by its name. Then I use setEnabled() for enabling/disabling.
The problem is that the label of the widget should be disabled too. I construct the name of the label (from Qt/Components/pqNamedWidgets.cxx:createPanelLabel(): ParaView3.2: %s_label, ParaView3.3:_labelFor%s) und use that name for finding the QWidget of the label, certainly a hack.
One solution could be to offer the programmer the possibility to retrieve the QWidget of the widget together with the QWidget of the label, e.g. by the name of the widget as defined in the XML file.