/******************************************************************************* eventFilter *******************************************************************************/ bool BrowserView::eventFilter(QObject *obj, QEvent *ev) { if(!is_started) return false; //Debug::debug() << "BrowserView eventFilter obj" << obj; int type = ev->type(); QWidget *wid = qobject_cast<QWidget*>(obj); if (obj == this) { return false; } if (wid && (wid == m_scrollbar )) { if(type == QEvent::Hide || type == QEvent::Show) { SceneBase * scene = m_scenes.value( VIEW::Id(SETTINGS()->_viewMode) ); if( scene->isInit() ) scene->resizeScene(); } } return QWidget::eventFilter(obj, ev); }
/******************************************************************************* resizeEvent *******************************************************************************/ void BrowserView::resizeEvent( QResizeEvent * event) { Debug::debug() << " [BrowserView] resizeEvent"; if(!is_started) return; SceneBase * scene = m_scenes.value( VIEW::Id(SETTINGS()->_viewMode) ); if( scene->isInit() ) scene->resizeScene(); event->accept(); }