From: stv Date: Fri, 16 Feb 2007 08:23:34 +0000 (+0000) Subject: no message X-Git-Tag: For_HDF~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27719e8a66a1ce4b90595204de9c7cb42d5c579d;p=modules%2Fgui.git no message --- diff --git a/src/Qtx/QtxDockWidget.cxx b/src/Qtx/QtxDockWidget.cxx index 90b3d40c9..acf84843d 100644 --- a/src/Qtx/QtxDockWidget.cxx +++ b/src/Qtx/QtxDockWidget.cxx @@ -79,9 +79,20 @@ myEmpty( true ) bool QtxDockWidget::Watcher::eventFilter( QObject* o, QEvent* e ) { if ( o == myCont && ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent || - e->type() == QEvent::Hide || e->type() == QEvent::HideToParent || - e->type() == QEvent::ChildAdded ) ) + e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) ) + { + installFilters(); QApplication::postEvent( this, new QEvent( QEvent::User ) ); + } + + if ( o == myCont && e->type() == QEvent::ChildAdded ) + { + QChildEvent* ce = (QChildEvent*)e; + if ( ce->child()->isWidgetType() ) + ce->child()->installEventFilter( this ); + + QApplication::postEvent( this, new QEvent( QEvent::User ) ); + } if ( o != myCont && e->type() == QEvent::WindowIconChange ) updateIcon(); @@ -152,8 +163,6 @@ void QtxDockWidget::Watcher::hideContainer() */ void QtxDockWidget::Watcher::customEvent( QEvent* e ) { - installFilters(); - updateIcon(); updateCaption(); updateVisibility();