如何设置UTF-8编码以读取字符串。例子
// outData =“абцд” - >西里尔字母
QMessageBox提示::信息(在此, “标题”,outData, “OK”);
void MainWindow::read() {
myProcess = new QProcess();
myProcess->start(QDir::currentPath() + "program.exe args args");
connect(myProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()));
}
void MainWindow::readOutput() {
QString outData = myProcess->readAllStandardOutput();
}