Force removal of all horizontal intervals in Qt

Using Qt, I set up the main dialog with horizontal layout. This horizontal layout contains three vertical layouts. I really want all the controls in these layouts to stick directly against each other, but I can't get QT to remove all the extras and intervals.

I set the spacing and adding all layouts to 0, and I used CSS to clear all borders, indents and margins. I still can't get rid of the curse interval.

Here is an image of how it looks:
Controls not pushed together.

As far as I can tell, these widgets should be pushed against this red line.

+4
source share
2 answers

You tried

layout->setContentsMargins(0,0,0,0);

... where layout is a pointer to QVBoxLayout, QHBoxLayout, etc.?

+1
source

For those with a similar problem, try one of the following

 layout->setContentsMargins(0,0,0,0); layout->setSpacing(0); layout->setMargin(0); 
0
source

All Articles