I have a label, and I set both the addition in the stylesheet and the margin with setMargin().
ui->label->setPixmap(redRectWithGreenBorder(80, 40));
ui->label->setStyleSheet("QLabel {border: 1px solid gray;border-radius: 2px;background-color: white;padding: 0px 5px 10px 15px;}");
ui->label->setMargin(5);
But here's what it actually looks like:

Visible fields are 5, 10, 15 and 20 (I checked using the image editor). That is, they are equal to the value of the stylesheet for this side, plus the value margin(), that is, 0 + 5, 5 + 5, 10 + 5, 20 + 5.
However, the documentation says this setMargin():
margin: int This property holds the width of the field.
Fields are the distance between the innermost pixel of a frame and the outermost pixel of content.
The default value is 0.
, , . . - .
: ? , , ?