From dfa6760020c62d5fd797feef6b20c1cbae0ce876 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 14 Mar 2011 09:15:41 +0000 Subject: Make setKeyboardFocus recursive instead of iterative. --- client/widgets/groupbox.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'client/widgets/groupbox.cc') diff --git a/client/widgets/groupbox.cc b/client/widgets/groupbox.cc index 3c00fa4..0d720ea 100644 --- a/client/widgets/groupbox.cc +++ b/client/widgets/groupbox.cc @@ -56,3 +56,17 @@ GroupBox::~GroupBox() { // delete groupbox; } + +bool GroupBox::setKeyboardFocus() +{ + QVector< Widget* >::iterator i = children.begin(); + while(i != children.end()) { + Widget *w = *i; + if(w) { + if(w->setKeyboardFocus()) return true; + } + i++; + } + + return false; +} -- cgit v1.2.3