QString s = ui->lineEdit->text();
QByteArray s; s.append(ui->lineEdit->text()); s = ui->lineEdit->text().toAscii(); s = ui->lineEdit->text().toLatin1(); s = ui->lineEdit->text().toLocal8Bit(); s = ui->lineEdit->text().toUtf8();
qDebug() << s;
C++ (Qt)while(!asleep()) sheep++;
QByteArray s; s.append(ui->lineEdit->text()); qDebug() << s; s = ui->lineEdit->text().toAscii(); qDebug() << s; s = ui->lineEdit->text().toLatin1(); qDebug() << s; s = ui->lineEdit->text().toLocal8Bit(); qDebug() << s; s = ui->lineEdit->text().toUtf8(); qDebug() << s;
QByteArray s; QTextCodec *codec = QTextCodec::codecForName("CP1251"); QTextCodec::setCodecForCStrings(codec); QTextCodec::setCodecForLocale(codec); QTextCodec::setCodecForTr(codec); s.append(ui->lineEdit->text()); qDebug() << s; s = ui->lineEdit->text().toAscii(); qDebug() << s; s = ui->lineEdit->text().toLatin1(); qDebug() << s; s = ui->lineEdit->text().toLocal8Bit(); qDebug() << s; s = ui->lineEdit->text().toUtf8(); qDebug() << s;