[Qt-interest] Help with expandable QTextEdit
Daniel Vérité
daniel.verite at gmail.com
Wed Dec 31 02:13:39 CET 2008
shiva sitamraju writes
> I want a QTextEdit whose height increases as I type in more lines (
> instead of a vertical scroll coming). And similarly when I remove
> some lines, the size shrinks back.
>
> Any suggestions on how to go about this ?
When the contents size changes, document()->documentLayout() emits:
documentSizeChanged(const QSizeF&)
You just need to connect that signal to a slot that resizes your
QTextEdit.
Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org
More information about the Qt-interest-old
mailing list