There is no "maximum height" for a QTextEdit. A QTextEdit will grow as tall (or short) as you let it.

A vertical layout will size the text areas into the space available in the widget the layout is applied to: in this case the container widget inside the scroll area view port. If you don't increase its size when you add new material then existing material shrinks to accommodate it. You can have the container widget automatically adopt the size of the accumulated sizeHint()s of child widgets using a Fixed vertical size policy. See the "Extension Example" in Assistant.