The labels are left aligned and they stretch when you resize the window. Either change size policies of the widgets (both labels and line edits) or provide a spacer which will use up the free space, depending on the effect you want to achieve.