From c1dc5913decb33adcf30b3f410db28c593ab49a1 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 20 Dec 2006 13:58:28 +0000 Subject: [PATCH] no message --- src/QDS/QDS_Datum.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; -- 2.39.2