#include "QtxAction.h"
#include "QtxToolBar.h"
+#include <QApplication>
+#include <QHideEvent>
#include <QMainWindow>
/*!
if ( !tb )
{
tb = new QtxToolBar( true, tbw );
- tb->setVisible( false ); // VSR: create toolbar visible initially
+ //tb->setVisible( false ); // VSR: create toolbar visible initially
tb->setFloatable( floatable );
tb->setAllowedAreas( dockAreas );
tb->setMovable( dockAreas & Qt::AllToolBarAreas );
tb->setWindowTitle( title );
tb->setObjectName( title );
tb->setToolTip( title );
+ QApplication::postEvent( tb, new QHideEvent());
}
tInfo.toolBar = tb;
bool updVis = ( o != myCont && ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ||
e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) ) ||
- ( o == myCont && ( e->type() == QEvent::ChildRemoved || e->type() == QEvent::Show ||
- e->type() == QEvent::ShowToParent || e->type() == QEvent::ActionAdded ||
+ ( o == myCont && ( e->type() == QEvent::ChildAdded || e->type() == QEvent::ChildRemoved || e->type() == QEvent::Show ||
+ e->type() == QEvent::ShowToParent || e->type() == QEvent::Hide ||
+ e->type() == QEvent::HideToParent || e->type() == QEvent::ActionAdded ||
e->type() == QEvent::ActionRemoved ) );
if ( updVis )
}
}
- vis = vis || (!empty && isVisible());
+ vis = (!isEmpty() && isVisible());
if ( vis != myCont->isVisibleTo( myCont->parentWidget() ) )
vis ? showContainer() : hideContainer();
}
*/
void QtxToolBar::setVisible( bool visible )
{
+ if ( isVisible() == visible ) return;
if ( myWatcher )
{
if ( visible )