Results 1 to 2 of 2

Thread: QStyle's question

  1. #1
    Join Date
    Jul 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default QStyle's question

    i want to change menu item's height,but the code didnot work.i don't know how to use PixelMetric.
    Qt Code:
    1. int Mstyle::pixelMetric(PixelMetric which, const QStyleOption* option, const QWidget * widget) const
    2. {
    3. switch(which)
    4. {
    5. case PM_MenuHMargin:
    6. return 40;
    7. case PM_MenuVMargin:
    8. return 40;
    9. default:
    10. return QWindowsStyle::pixelMetric(which,option,widget);
    11. }
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QStyle's question

    Please provide a minimal compilable example reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 0
    Last Post: 31st May 2009, 17:51
  2. SQL Question
    By ^NyAw^ in forum Qt Programming
    Replies: 5
    Last Post: 8th April 2008, 20:36
  3. Exceptions / setjmp/longjmp question
    By Aceman2000 in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2008, 18:14
  4. Question regarding how to paint after zoom.
    By JonathanForQT4 in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2007, 16:34

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.