Hello,
QTextEdit used to have a length() member that is gone. I cannot find any hint in the documentation about what to do in QT4.1.1.
What is the way to get the length of a QTextEdit widget ?
Printable View
Hello,
QTextEdit used to have a length() member that is gone. I cannot find any hint in the documentation about what to do in QT4.1.1.
What is the way to get the length of a QTextEdit widget ?
Maiby txtEdit->toPlainText()->lenght() can help?
Or you mean max lenght that can be writed in text edit?
Code:
QString s; s= qMessage->toPlainText(); int NbCharRestants = NbCharSMSMax - s->length(); s.setNum(NbCharRestants,10); s = TxtCharSMSMax + " " + s;
does not fix the problem, compile error on line 3 :
152 C:\Qt\test\sms\menu.cpp base operand of `->' has non-pointer type `QString'
I mean the length of the QTtext String afetr user input.
Try:Quote:
Originally Posted by incapacitant
Code:
int NbCharRestants = NbCharSMSMax - s.length();