Adding space in top and bottom of a border with stylesheet
Solved
General and Desktop
-
Hi, i want to add a border like shown in the bellow pic.
See there is spacing on the borders so they don't touch each other. here is my stylesheet
QToolButton { border: none; border-radius: 0px; background-color: transparent; border-left: 2px solid blue; } QToolButton:hover { background-color: palette(Highlight); } QToolButton:pressed { margin-left: 1px; margin-top: 1px; }
here is the result , i need the border not touching each other.
I can add spacing in the layout, but it's taking extra space that i don't want
-
See The Box Model and try playing with the margin properties.
If that fails you can create your on QToolButton sub-class and perform custom painting of the "border"