Layout alignment option doesn't actually align widget in QHBoxLayout
-
That's why a minimal compilable example is useful: people work together on the same issue in the same conditions.
-
https://drive.google.com/file/d/1LPRK2Xyax7FpnLzU_JxGczKNrYjNSIxS/view?usp=sharing
Here, a minimal compilable example. As you can see Button2 won't move strictly to the left, next to Button1.
-
Hi
Super with both code and picture.However, its working as expected.
The box layout is a bit special how it operates.
When you put in 2 buttons. the area allocated to the layout is split into 2 parts of the same size.
When you then ask a button to align left, it aligns left in the half area where it belongs.So it does align to the left as you can see on your picture.
The right button is aligned to the left of its right part of the total area.You can press them to the left by using a Spacer
-