Given QPainterPath , how can I stroke the path only at the inner or outer edge of the path (or left or right -side for unclosed paths)?
QPainter::strokePath() centers the pen along the path and causes the same amount of ink to fall on both sides. For a visual example of the desired effect, see the figure I made (for an SVG suggestion, not a function):

I do not mind if this is done using any hacking, like setting the path itself as a clipping region (for the inside) or a clipping zone (for the outside).
The goal is to fill the rounded rectangle with a fill with a low opacity, and then just pull it with a stroke with a lower opacity to simulate a two-step drop in blur. If the stroke overlaps the fill, the opacity is doubled, which leads to the destruction of the effect. Due to the complex shape, simply scaling the path will not work well, even if it can work for the circles and rectangles drawn above.
source share