Currently I have QMenuBar with three QActions and it looks like this:
but I would like to get this (get some QActions right-aligned):
Is there a way to do this?
Probably the most simple solution to this particular problem is to use the corner widget. It can be used to place almost anything at the rightmost position, of course also a new menu bar:
QMenuBar *bar = new QMenuBar(ui->menuBar);
QMenu *menu = new QMenu("Test menu", bar);
bar->addMenu(menu);
QAction *action = new QAction("Test action", bar);
bar->addAction(action);
ui->menuBar->setCornerWidget(bar);
Result:
This is esp. helpful when the main menu is still to be edited in QDesigner...