Can anyone please tell me how to hide the right arrow for the QMenu items. I tried using the stylesheet. But it didn't works.. Please Help.
MyStylesheet.qss
QMenu::right-arrow[hide="true"]
{
image: url(Resources/MenuRight.png); //am using an unavailable image so that it will return empty.
}
and in code i have set the property as,
menuItem->setProperty("hide", true)
;
but in the stylesheet(shown below) if i remove the dynamic property, then it is working fine. the background color of the right arrow changes to red.
QMenu::right-arrow
{
background-color: red;
}
You can use the menu-indicator property in the stylesheet of the item.
Here with a
QPushButton
: