Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to resize QTextEdit when append long text?
Arrandale last edited by
My QTextEdit now expand follow to mainwindow.
I want to resize QTextEdit to fit long text.
How to do that?
Jeroentjehome last edited by
Below the QTextEdit place a vertical spacer. Place both in a horizontal layout. This will make the QTextEdit increase/decrease with added/removed text and makes the size of the QTextEdit dependant of the substance. Also when MainWindow resizes, it will follow. Don't forget to set a minimumsize hint for the QTextEdit to indicate a minium size to shrink to.