Search code examples
qtqt4qt4.8qpushbuttonqmenubar

Stacking QPushButtons on the other side of a QMenuBar


I want to stack some QPushButton objects on the other side of my QMenuBar.

This is how my window looks now: how it looks

And this is how I want it to look like (I've photoshopped the image): how i want it to look

I know that in the motif widget style, the help menu is aligned to the right, but I'm sticking with plastique, so it's not a problem for me.

I'm using Qt4.8. Any ideas?


Solution

  • QMenuBar has a setCornerWidget function, that sets a widget (that may include a whole layout) as the cornet widget.