QLineEdit :: textEdited () equivalent in QTextEdit?

QLineEdit has a signal textEdit() , which is emitted only if the user changes the text, but not when calling setText() ,

So what is equivalent in QTextEdit ? I only see the textChanged() signal, and the documentation states that it is emitted whenever a text document changes.

EDIT

I want to implement an auto save function, with QTimer, of course,

So, when you start editing a document, the timer starts, and when the time runs out, I save the text inside the widget.

+4
source share
1 answer

You can block the signals of the QTextEdit widget whenever you insert / modify the contents yourself, and then release the block when you are done. In this case, the signal will be triggered only when the user makes changes to the contents.

 bool QObject::blockSignals(bool block) 
+9
source

All Articles