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

Qt Code:
  1. QMenu::right-arrow[hide="true"]
  2. {
  3. image: url(Resources/MenuRight.png); //am using an unavailable image so that it will return empty.
  4. }
To copy to clipboard, switch view to plain text mode 
And in cpp file, i have set the property for hiding the right arrows of the QMenu.

Qt Code:
  1. menuItems-->setProperty("hide", true);
To copy to clipboard, switch view to plain text mode 
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.

Qt Code:
  1. QMenu::right-arrow
  2. {
  3. background-color: red;
  4. }
To copy to clipboard, switch view to plain text mode