in the QTextEdit class, there is no method to have a restriction on the number of characters the user...
QString toPlainText() const
void setText(const QString &text)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)