PDA

View Full Version : Stylesheets & QPushButton menus



zuck
16th September 2009, 22:54
Hi, I need to change the style of a QPushButton menu. I've already tried these statements without success:



QPushButton QMenu {
/* ... */
}

QPushButton QAbstractItemView {
/* ... */
}


So how can I create a custom style for QPushButton menus? :)

yogeshgokul
17th September 2009, 07:52
Hi, I need to change the style of a QPushButton menu.
This is not documented in Qt style sheet sub controls list but you can give it a try because your try has a significant mistake.
Try this:

QPushButton::menu{
/* DO SOME STYLING */
}

zuck
17th September 2009, 12:08
It doesn't work :(

yogeshgokul
17th September 2009, 12:31
Ok !, This is clear now, you just style the QMenu and QPushbuttdon's menu will also styled.

QMenu{
//Do Some Styling
}

zuck
17th September 2009, 14:49
Unfortunately, I've already tried this and it doesn't work too...

Toutyx
3rd November 2011, 16:40
Hello,

I have the same problem...
The QMenu's style doesn't work with the QPushButton's menu... :mad:

Have you got one idea??

Sorry for my poor english, it's not my mother tongue.

Antony