PDA

View Full Version : Adjust the initial size of a QTextEdit in a layout



hecinho
26th November 2009, 16:58
Hi there,

I made a small dialog which shows a QTextEdit and some other widgets in a QVBoxLayout. Now I would like to define the initial size of the textedit because the height given by the layout it's much too large. I want it to be quite small in the beginning but stretchable in case the user resizes the whole dialog vertically.

The only way I could figure out how make the textedit smaller is by specifying a maximum height but then it is not resizeable anymore.

I tried several combinations of vertical size policies (Minimum,MinimumExpending,...) and another layout (QGridLayout) but could not find a solution.

Thanks in advance.

cheers, hecinho