How to reduce the size of LineEdit and labels when present in a layout.
I have a lineEdit and Label in a horizontal layout.I want to reduce the width of the lineEdit I tried inserting horizontal spacer in the layout still not able to reduce its width.
You could set maximumWidth() (on the lineEdit)
to disallow it to grow over a size.
You can also set stretch factor if you want to share the space
in non fix manner.
cant this be done in the design mode?
I have many labels and lineEdits.I want to align them properly.
Yes it can be done in Designer.
Its all in the properties.
From your description, you might be interested in QFormLayout.