From abe143670b174e2604c97224df14732bf059f151 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 18 Aug 2010 12:04:12 +0000 Subject: Make setEnabled work recursively. --- client/widgets/widget.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'client') diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index 88151ce..9ebed55 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -150,6 +150,13 @@ void Widget::setEnabled(bool enabled) widget->setEnabled(enabled); if(enabled) eventOnChange(); else setValid(true); // Force disabled widgets to be valid + + QVector< Widget* >::iterator i = children.begin(); + while(i != children.end()) { + if(*i) (*i)->setEnabled(enabled); + i++; + } + } bool Widget::enabled() -- cgit v1.2.3