How to remove extra spacing around QWidget?
Here is a simple example. Widget - gray; you see, there is some kind of space (about 0.3-0.4 cm) around its contents (image, text and button).
Widget space highlighted
setAutoFillBackground(true); QPalette pal(palette()); pal.setColor(QPalette::Background, QColor("#e5e5e5")); setPalette(pal);

Here is the content (highlighted when running setStyleSheet( "background-color: red"); for the entire widget.

"Removing the extra interval" I mean removing about gray space about 0.2-0.3 cm around the contents.
source share