problem with QMenu::icon border
Hi Everyone,
I don't want any border for the icon of my QMenu but the border appears for the icon when an item gets selected. I am using the following stylesheet but it doesn't work:-
Code:
setStyleSheet
(QString::fromUtf8("QMenu\n" "{\n"
"background: none;background-color: green;color:white;\n"
"}\n"
"QMenu::item:selected\n"
"{ \n"
"background-color: blue;\n"
"}\n"
"QMenu::icon:checked\n"
"{ \n"
"border: none;\n"
"}"));
I tried to follow the examples given in http://harmattan-dev.nokia.com/docs/...tomizing-qmenu but it doesn't help. For the items which don't have focus the icons appear without any border. But for the selected item the icons come with a border :confused: . I would be glad if someone would help me with this.
-thanks
sattu
Re: problem with QMenu::icon border
Hi!
You can use something like this:
Code:
setStyleSheet
(QMenu::item:selected
{border
:none;
});
but you also need to set item padding:
Code:
setStyleSheet("QMenu::item{padding-left: (value here)px;}