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.
}
QMenu::right-arrow[hide="true"]
{
image: url(Resources/MenuRight.png); //am using an unavailable image so that it will return empty.
}
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.
menuItems-->setProperty("hide", true);
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.
{
background-color: red;
}
QMenu::right-arrow
{
background-color: red;
}
To copy to clipboard, switch view to plain text mode
Bookmarks