PDA

View Full Version : How to fix size of menu bar?



vuletic
14th December 2014, 18:48
Hello, I'm having problem adjusting menu bar as you can see on this picture: http://i.imgur.com/ACt8x9e.png (refresh link if it doesn't show) there is some free space on the left of text(open file,save file,..), any idea how to scale my bar to take size of the text?

ChrisW67
14th December 2014, 20:30
That space is for the icon or checkmark of the menu item. It is put there by the default style because that is "normal" for whatever platform you are on (or one of the menu items has a blank icon set)

You may be able to adjust it using a style sheet affecting QMenu objects:
http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qmenu
Look at the padding and margin of QMenu::item

vuletic
14th December 2014, 22:30
That's just what I needed, thanks! :)