Solved QProcess: Not reading ONLY std::cerr
-
Inside my main application, I'm trying to read the
QProcess
standard output (std::cout) and standard error (std::cerr).With this code below I aready can read the standard output, but I don't get the standard error. Why?
_process = new QProcess(this); // Read std::cout connect(_process, &QProcess::readyReadStandardOutput, [&]() { auto data = _process->readAllStandardOutput(); ui->console_txt->appendPlainText(data); }); // Read std::cerr connect(_process, &QProcess::readAllStandardError, [&]() { auto data = _process->readAllStandardError(); ui->console_txt->appendPlainText(data); });
Why is this happening?
-
@fem_dev I found my error:
&QProcess::readyReadStandardError
-
UPDATE 1:
In the Qt Creator IDE console, I got this message about thestd::cerr
code in compile time:QObject::connect: signal not found in QProcess
How can I fix it?
-
@fem_dev I found my error:
&QProcess::readyReadStandardError