Stylesheet for QMenu leaves a white spot at the end
Solved
General and Desktop
-
Hi, so I don't know why, but when I try to set a stysheet for qmenu items, it leaves a white spot at the end. Here's what it looks like:
Code:"QMenu {background-color: white; border: 0.5px solid black;}" "QMenu::item {color: black; background-color: transparent;}" "QMenu::item:selected {color: white; background-color: rgb(0, 120, 215);}
I tried round corners too, but that makes even more white spots:
Code:"QMenu {background-color: white; border: 0.5px solid black; border-radius: 10px; padding: 5px;}" "QMenu::item {color: black; background-color: transparent;}" "QMenu::item:selected {color: white; background-color: rgb(0, 120, 215);}"
-
When I modify the
padding
of the item + selected item the small white area is gone. But then you probably need to define more setting since it overwrites the default config:"QMenu { background-color: white; border: 0.5px solid black;}" "QMenu::item { padding: auto; color: black; background-color: transparent;}" "QMenu::item:selected { padding: auto; border: 0.5px; color: white; background-color: rgb(0, 120, 215);}"
Play around with
padding
,margin
andborder
values until it looks like expected :)Edit:
Nice, didn't read your comment. Spent the time trying it myself :)