From: stv Date: Wed, 20 Dec 2006 13:58:28 +0000 (+0000) Subject: no message X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1dc5913decb33adcf30b3f410db28c593ab49a1;p=modules%2Fgui.git no message --- diff --git a/src/QDS/QDS_Datum.cxx b/src/QDS/QDS_Datum.cxx index 848fe6a04..54fb1a383 100644 --- a/src/QDS/QDS_Datum.cxx +++ b/src/QDS/QDS_Datum.cxx @@ -4,6 +4,8 @@ #include +#include + #include #include #include @@ -71,7 +73,12 @@ void QDS_Datum::Wrapper::setWidget( QWidget* wid ) if ( myWid->parent() != this ) myWid->reparent( this, QPoint( 0, 0 ) ); - myWid->installEventFilter( this ); + QWidget* w = myWid; + while ( w ) + { + w->installEventFilter( this ); + w = w->focusProxy(); + } setTabOrder( this, myWid ); setFocusProxy( myWid ); @@ -82,7 +89,7 @@ void QDS_Datum::Wrapper::setWidget( QWidget* wid ) bool QDS_Datum::Wrapper::eventFilter( QObject* o, QEvent* e ) { - if ( o == widget() && ( e->type() == QEvent::FocusIn || e->type() == QEvent::FocusOut ) ) + if ( Qtx::isParent( o, this ) && ( e->type() == QEvent::FocusIn || e->type() == QEvent::FocusOut ) ) QApplication::sendEvent( this, e ); return false;