From 27719e8a66a1ce4b90595204de9c7cb42d5c579d Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 16 Feb 2007 08:23:34 +0000 Subject: [PATCH] no message --- src/Qtx/QtxDockWidget.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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(); -- 2.39.2