如题:
我的qt版本是2.3.10.
我的做法是:
const char* temp=QMltiLineEdit::text().latin();
strlen(temp);
可是返回的数据不正确。
QString 的文档上面说:
const char* QString::latin1 () const
Returns a Latin-1 representation of the string. Note that the returned value is undefined if the string contains non-Latin-1 characters. If you want to convert strings into formats other than Unicode, see the QTextCodec classes.
This function is mainly useful for boot-strapping legacy code to use Unicode.
The result remains valid so long as one unmodified copy of the source string exists.
蓝色的部分,我看不懂!