]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
no message
authorstv <stv@opencascade.com>
Fri, 16 Feb 2007 08:23:34 +0000 (08:23 +0000)
committerstv <stv@opencascade.com>
Fri, 16 Feb 2007 08:23:34 +0000 (08:23 +0000)
src/Qtx/QtxDockWidget.cxx

index 90b3d40c9383ce160fdf7662513d687c22fa5031..acf84843da6275787ca2bb23e9d9e10487ad9ac4 100644 (file)
@@ -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();