This issue could be caused by incorrect settings of the size policies or stretch factors of the widgets within the QFormLayout.
To solve this, you can try adjusting the following:
- set the horizontal stretch factor of the labels to 1 and the fields to 2 or more to allow the fields to take up more horizontal space
- set the vertical size policy of the labels and fields to "MinimumExpanding" so they will adjust their size based on available space
- use QSizePolicy::Expanding for the size policy of the QFormLayout to allow it to expand and shrink according to the size of its parent widget
- adjust the margins of the QFormLayout to give more space between the rows.
You may need to experiment with these settings to find the optimal values for your layout.