When text in text edit changed
if text length is less than or equal to the maximum length
do nothing <--- REALLY important! Otherwise you might end in an infinite loop
else
Truncate the text to the maximum length <--- this will fire the textChanged signal again!
When text in text edit changed
if text length is less than or equal to the maximum length
do nothing <--- REALLY important! Otherwise you might end in an infinite loop
else
Truncate the text to the maximum length <--- this will fire the textChanged signal again!
To copy to clipboard, switch view to plain text mode
You will be looking at textChanged(), toPlainText(), truncate(), setPlainText() and size() or length()
Bookmarks