PDA

View Full Version : QTextEdit issue



vijay anandh
20th October 2006, 09:38
Hi

I am having One QtextEdit control and i have Overridden keypressEvent to limit the maximum no of characters in the QTextEdit. Its working fine, But what is the problem is If we copy data from outside, it menas from notepad or some other, and paste in the textedit controls, it accepts all the characters.

I want to limit

How it can be done

Warm regards
Vijay

wysota
20th October 2006, 10:07
I'd reimplement append(), insertHtml() and insertPlainText(). Another choice is to connect to the textChanged() signal and manipulate the text from a slot, but this will probably break the undo/redo functionality.