PDA

View Full Version : Moving menu to the right menubar corner



maverick_pol
20th March 2008, 16:29
Hi guys,

I have some menus inserted in the menubar of my mainwindow. One menu contains totally different set of actions and I want that menu to be placed in the right corner of that menubar. How can I align a menu to be placed on the right handside of a menubar?

Beforehand thanks!

Kacper

wysota
20th March 2008, 17:07
Have you tried adding a separator to QMenuBar instance?

maverick_pol
20th March 2008, 20:16
haven't tried it yet, as I wrongly assumed that separator is used between actions. If it can be used between menus I will try it.

Thanks.

Kacper

wysota
20th March 2008, 20:38
QMenuBar has an insertSeparator() method so I assume it can.

pherthyl
21st March 2008, 05:24
Hmmm.. insertSeparator() doesn't seem to do anything. No matter how many separators I insert before an action, my menu still looks the same. And QActions with icons won't render their icons when added to the menu bar.. Too bad, looks like I'll have to subclass.