How to remove extra spacing around QWidget?
Here\'s the simple example. The widget\'s space is grey; you see, there\'s some space (about 0.3-0.4 cm) around the conte
Change the contents margins of the layout you added the QWidget to and any other layout you wish to change by using the method setContentsMargins().
There are two functions that you can use to get rid of all the spacing in your layout:
1)QLayout::setMargin(0) 2)QLayout::setSpacing(0)