(Mar-24-2021, 02:28 AM)deanhystad Wrote: Qt layouts grow to fill the window. What are you trying to do? You can achieve different affects by using layouts in layouts, layouts in widgets in layouts, different kinds of layouts, setting things like alignment for where widgets appear in layout, and setting stretch factors in a layout. If you can describe what you are trying to achieve I may be able to help you.
This is in Qt Designer. But I don't mind if it's in code; I'm not too fond of the Designer anyway. I'm beginner (I'm used to C# code, I don't mean that, but Qt GUI development). So please explain the relevant properties, methods, instead of "only" providing a solution :)
![[Image: Og0o2BA.png]](https://i.imgur.com/Og0o2BA.png)
Final goal:
![[Image: PSrdLEj.png]](https://i.imgur.com/PSrdLEj.png)
Here's another example with a line edit. The right edge of the line edit needs to touch the edge of its parent on the right.
This is in a horizontal layout. So if the layout auto-sizes with the form, then the line edit must autosize with the layout.
![[Image: xz6oz4G.png]](https://i.imgur.com/xz6oz4G.png)