Results 1 to 6 of 6

Thread: how to remove shadow of QMenu?

  1. #1

    Default how to remove shadow of QMenu?

    how to remove shadow of QMenu?
    Qt Code:
    1. QMenu menu;
    2. menu.addAction(actionPaste);
    3. menu.addSeparator();
    4. menu.exec(QCursor::pos());
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 30th March 2011 at 12:44. Reason: missing [code] tags

  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: how to remove shadow of QMenu?

    Modify the style of the menu.
    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.


  3. #3
    Join Date
    Mar 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to remove shadow of QMenu?

    Quote Originally Posted by wysota View Post
    Modify the style of the menu.
    can you give an example?

  4. #4
    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: how to remove shadow of QMenu?

    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.


  5. #5
    Join Date
    Mar 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to remove shadow of QMenu?

    Thanks! However, for my application it was enough to install qtconfig and set up gtk+ style, which doesn't use shadows. Anyway, thanks a lot!

  6. #6
    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: how to remove shadow of QMenu?

    You don't need qtconfig for that. It's enough to use QWidget::setStyle() in your code.
    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. QMenu without shadow
    By furj in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2013, 22:00
  2. Remove shadow of child widgets? Like a sunken frame...
    By new_voodoo in forum Qt Programming
    Replies: 0
    Last Post: 14th December 2010, 00:31
  3. Replies: 0
    Last Post: 27th April 2010, 16:15
  4. About QTreeView's shadow.
    By yangyunzhao in forum Qt Programming
    Replies: 3
    Last Post: 19th August 2009, 09:52
  5. A Shadow of my groupBox
    By baray98 in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2008, 22:41

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.