75250 for(i=0;i<n;i++){text[i] = ui->PlainTextEdit->toPlainText().utf16()[i];} 5813 ui->PlainTextEdit->setPlainText(QString::fromUtf16(text,n));
const ushort *rezutf16 = ui->PlainTextEdit->toPlainText().utf16()
for(i=0;i<n;i++){text[i] = rezutf16[i];}
QByteArray myQByteArrayData= ui->PlainTextEdit->toPlainText().toUtf8();// toAscii(), toLatin1(), toLocal8Bit(), see alse QTextCodec.text = myQByteArrayData.data();
QString tmp; int i,n; unsigned short *text; n = ui->PlainTextEdit->toPlainText().length(); text = new unsigned short[n]; tmp = ui->PlainTextEdit->toPlainText(); for(i=0;i<n;i++) { text[i] = tmp.utf16()[i]; } tmp.fromUtf16(text,n); ui->PlainTextEdit->setPlainText(tmp); delete text;
QString str=ui->PlainTextEdit->toPlainText();const ushort *rezutf16 = str.utf16();
ui->PlainTextEdit->setPlainText(tmp);
ui->PlainTextEdit->clear();ui->PlainTextEdit->appendPlainText(tmp);