If you call QTabWidget::addTab() with a QTextEdit then resizing is automatic. Since you imply that you are not seeing that then you need to show us how you put your text edit 'into' your tab widget.