QToolBar* fileToolBar = new QToolBar;for(;;) { fileToolBar->addSeparator(); fileToolBar->clear(); QApplication::processEvents();}
QAction *QToolBar::addSeparator(){ QAction *action = new QAction(this); action->setSeparator(true); addAction(action); return action;}
void QToolBar::clear(){ QList<QAction *> actions = this->actions(); for(int i = 0; i < actions.size(); i++) removeAction(actions.at(i));}