[Solved] QObject::connect() for C++11 lambda expression doesn't work
-
Hi Folks,
I have a project, wher a user interaction starts a new process via a QProcess instance. The output is redirected into a QTextEdit object. To do that, I use a lambda expression:
@
connect(&_process, &QProcess::readyReadStandardError, this {_ui->_runOverview->append(QString(_process.readAllStandardOutput()));});
@When I start the process, I don't see anyithing on the TextEdit. I tried to debug by using of qDebug() macro, but it wrote out nothing (just an empty ""). Can anybody help me?
Regards,
Norbert -
Hi,
Just a wild guess but shouldn't you be reading from readAllStandardError since you connect to readyReadStandardError ?
Hope it helps
-
No worries, this happens to everybody :)
Happy coding !