I have an unpleasant problem. I created a QVBoxLayout on which I added my widgets. This is a sample from my constructor:
layout = new QVBoxLayout;
layout->setMargin(0);
layout->setContentsMargins(QMargins(0,0,0,0));
layout->setSpacing(0);
And then I have a function to add widgets.
layout->addWidget(_wave);
_wave is my own widget. But you can add whatever you want, for example QButton.
What do I want to achieve?
Similarly , but without any spaces between widgets added to the layout. Only QButtons or another widget tied to each other.
I have added everywhere setMargins, setSpacing, etc. Please help me with this, I really do not know what to do.

, , . mainWindow, QWidget. . , , . , . - .