I need to add a progress bar to my application, but I'm trying to minimize wasted space in the GUI. My QMenuBar only has a few root menus, and there is plenty of wasted space at the far right of this widget. Is there a way to add a QProgressBar widget in this space? The QMenuBar documentation seems to indicate it only supports text menus, but it also says "Widgets can be added to menus by using instances of the QWidgetAction class to hold them." I believe this is just for adding icons to menu items, not the menu bar.
not exact. You may add there anything you want.
QWidgetAction* actProgressBar = new QWidgetAction(this);
QProgressBar* bar=new QProgressBar(this);
// setup progressbar here
actProgressBar->setDefaultWidget(bar);
menuBar->addAction(actProgressBar);
this adds progress bar to menu bar.