QT框架从CMD设置编码

时间:2017-02-20 11:36:57

标签: qt encoding utf-8

如何设置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();
    }

0 个答案:

没有答案