Maiby txtEdit->toPlainText()->lenght() can help?
Or you mean max lenght that can be writed in text edit?