What event (if any) does QTextEdit fire when the size of its content changes?
As the title says, how can I receive notification whenever a multi-line QTextEdit changes the size of its content?
(Note: content size is different from the control size, i.e. I want to know when lines were added or removed, or change开发者_如何学运维d height because of a font change).
QTextEdit has a textChanged() signal which will do what you want. From the docs:
"This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied."
I wasn't sure if formatting included font changes but I tested it and it does.
加载中,请稍侯......
精彩评论