How to Hide the Right Arrow in QMenu?
-
Can anyone please 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;
}@ -
this is not correct:
@
QMenu::right-arrow[hide="true"]
{
}
@but this is:
@
QMenu[hide="true"]::right-arrow
{
}
@ -
another possibility would be to set a 1x1 px transparent png. Maybe Qt rejects a image it can't find? I don't know...
-
I have the same problem, I've searched all google and I have no answer. So I added it as a suggestion in the Qt bug tracker
-
I have the same problem, I've searched all google and I have no answer. So I added it as a suggestion in the Qt bug tracker
@Navis-Raven You could have provided a link to the bugreport here.
I'll do it for you this time: QTBUG-74501