blivrail
26th May 2008, 23:08
Hello,
On the Qt 4.4 documentation (http://doc.trolltech.com/4.4/qwidget.html#enabled-prop), it states that if you set a parent widget (such as a QMainWindow) to disabled using setEnabled( false ), all children widgets are implicitly disabled.
Using this call, is there a way to keep one children widget enabled?
I know I can do something like this:
QList<QWidget*> list = parentWidget->findChildren<QWidget*>() ;
foreach( QWidget* w, list )
{
w->setEnabled( false ) ;
}
childWidget->setEnabled( true ) ;
But then I lose the existing enabled/disabled state of the widgets.
Thanks!
On the Qt 4.4 documentation (http://doc.trolltech.com/4.4/qwidget.html#enabled-prop), it states that if you set a parent widget (such as a QMainWindow) to disabled using setEnabled( false ), all children widgets are implicitly disabled.
Using this call, is there a way to keep one children widget enabled?
I know I can do something like this:
QList<QWidget*> list = parentWidget->findChildren<QWidget*>() ;
foreach( QWidget* w, list )
{
w->setEnabled( false ) ;
}
childWidget->setEnabled( true ) ;
But then I lose the existing enabled/disabled state of the widgets.
Thanks!