tags:

views:

373

answers:

2

How to make QTextEdit to be resized in a QWidget while the QWidget is being resized? Should I overload resizeEvent functin for the QWidget?

+1  A: 

No, you should set the sizePolicy property for your QTextEdit object.

chalup
It is set "Expanding" and anyway, it doesn't work!
Narek
In addition to this, you also need to have the text edit be inside a layout of the containing widget, all the way up to the main widget that is being resized.
Caleb Huitt - cjhuitt
+3  A: 

You should use layouts too achive this. There is an excellent tutorial by the trolls on how to do this: http://qt.nokia.com/doc/4.6/layout.html.

merula