Qt/C++: interrupt QProcess arbitrarily with button (simulate ^c)
So I need to make a Qt Application (with GUI) that executes the "adb
logcat" command (it's a log that keeps being generated until ^c is
pressed). I need a GUI button to make the process stop and pass the output
to a Text Browser. This is the code I use to get the QProcess output:
QProcess process;
process.start("adb logcat");
process.waitForFinished(-1);
QByteArray logcatOut = process.readAllStandardOutput();
ui->devicesOutput->setText(logcatOut);
Thank you
No comments:
Post a Comment