I would like to manage the space between my widgets, verticaly and horizontaly.
Here is a picture that illustrate what I want:
When I click on the red point, I want to reduce/extend the spaces where the red lines are (vertically).
When I click on the blue point, I want to reduce/extend the spaces where the blue lines are (horizontally).
My architecture is like that:
A main Widget with a layout, which contains the left/right arrow buttons and a QWidget for all the white views.
This QWidget contains a QGridLayout. In this QGridLayout I have the "left", "back"... widgets (in white on the screenshot).
- QWidget with a layout
- left arrow
- right arrow
- QWidget with a QGridLayout (GRIDLAYOUT)
- QWidget with a VBoxLayout and 2 labels inside. (VIEW)
I tried to set the VIEW->setContentsMargins(); but the white rectangle stay the same, only the spacing inside this rectangle change (between the border and the "left" label for example (1 and 2 on the screen)).
I also tried to set the GRIDLAYOUT->setContentsMargins(); but this time only the the spacing of number 3 and 4 on the screen are changing.
Obviously there is the same behaviour for the horizontal resizing. (the blue marks on the screenshot.
The spacing doesn't allow to manage vertical and horizontal spacing separately...
I hope that you understand what I try to explain :o
How can I manage this ?
Thank you in advance,