Results 1 to 3 of 3

Thread: How to fix size of menu bar?

  1. #1
    Join Date
    Dec 2014
    Posts
    29
    Thanks
    12
    Qt products
    Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default How to fix size of menu bar?

    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?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to fix size of menu bar?

    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/sty...tomizing-qmenu
    Look at the padding and margin of QMenu::item
    Last edited by ChrisW67; 14th December 2014 at 19:33. Reason: updated contents

  3. The following user says thank you to ChrisW67 for this useful post:

    vuletic (14th December 2014)

  4. #3
    Join Date
    Dec 2014
    Posts
    29
    Thanks
    12
    Qt products
    Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: How to fix size of menu bar?

    That's just what I needed, thanks!

Similar Threads

  1. Replies: 5
    Last Post: 29th November 2012, 15:26
  2. Replies: 1
    Last Post: 18th May 2012, 11:36
  3. Replies: 1
    Last Post: 4th November 2011, 11:25
  4. Menu icon size in stylesheet?
    By ComServant in forum Newbie
    Replies: 1
    Last Post: 19th November 2010, 13:45
  5. Replies: 5
    Last Post: 13th October 2010, 04:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.