PDA

View Full Version : Limiting the display size of QPlainTextEdit



Adler
20th November 2016, 13:23
Hi all,

To my QFormLayout I add a QPlainTextEdit element.

When i change the size of my Application Window using my mouse, it stretched vertically the size of my QPlainTextEdit.

I would like to fix the QPlainTextEdit to 4 lines window.

anda_skoa
20th November 2016, 17:14
The default size policy for widgets such as the text edit is to grow.
You can try setting a different size polixy, e.g. Preferred, or set a maximum height, e.g. derived from the current font via QFontMetrics.

Cheers,
_