PDA

View Full Version : how to remove shadow of QMenu?



lonewsj
30th March 2011, 11:53
how to remove shadow of QMenu? :)

QMenu menu;
menu.addAction(actionPaste);
menu.addSeparator();
menu.exec(QCursor::pos());

wysota
30th March 2011, 12:44
Modify the style of the menu.

UrfinJuice
1st April 2011, 15:51
Modify the style of the menu.
can you give an example?

wysota
1st April 2011, 16:38
Styles example

UrfinJuice
2nd April 2011, 08:45
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!

wysota
2nd April 2011, 09:40
You don't need qtconfig for that. It's enough to use QWidget::setStyle() in your code.