Commit 5f91314b authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[FIX] avoid flashing when toolbar changes size by avoiding toolbar changing

size :-)
parent 14670a90
......@@ -29,6 +29,11 @@ WQtToolBar::WQtToolBar( QWidget* parent )
: QToolBar( parent )
{
this->setAllowedAreas( Qt::TopToolBarArea | Qt::BottomToolBarArea );
// The following makes the bar having button size from the beginning.
QPushButton* dummyButton = new QPushButton;
dummyButton->setFixedWidth( 0 );
addWidget( dummyButton );
}
WQtToolBar::~WQtToolBar()
......@@ -49,4 +54,9 @@ WQtPushButton* WQtToolBar::addPushButton( QString name, QIcon icon, QString labe
void WQtToolBar::clearButtons()
{
clear();
// The following prevents the bar from changing size when it has no real buttons.
QPushButton* dummyButton = new QPushButton;
dummyButton->setFixedWidth( 0 );
addWidget( dummyButton );
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment