toolBar->addAction(...); // actions before stretch
toolBar->addWidget(stretchWidget); // stretch
toolBar->addAction(...); // actions after stretch
QWidget* stretchWidget = new QWidget(toolBar);
stretchWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
toolBar->addAction(...); // actions before stretch
toolBar->addWidget(stretchWidget); // stretch
toolBar->addAction(...); // actions after stretch
To copy to clipboard, switch view to plain text mode
PS. Please search the forums. This has been asked before.
Bookmarks