PDA

View Full Version : How to Hide the Right Arrow in QMenu?



JavidRoshan
10th December 2013, 15:14
Can anyone plesae suggest me a way for hiding the right arrows of the QMenu. I tried using the stylesheet, but it doesn’t works.

MenuRightArrow.qss


QMenu::right-arrow[hide="true"]
{
image: url(Resources/MenuRight.png); //am using an unavailable image so that it will return empty.
}
And in cpp file, i have set the property for hiding the right arrows of the QMenu.


menuItems-->setProperty("hide", true);
In the stylesheet, if I remove the dynamic property “[“hide”, true]” then if i set a background color for the right arrows, then it works fine. but when am using the property [“hide”, true], then the right arrow is not hiding. Please suggest.


QMenu::right-arrow
{
background-color: red;
}