this code was meant to compile a C file and read the errors encountered while compiling a file through gcc in ubuntu.
my problem is that variable result is always empty, even in case of error containing file, result should have "errors" (these are same errors which are displayed in terminal if file is compiled )
Qt Code:
QProcess myProcess; QStringList arguments; arguments << fileName; myProcess.start(program, arguments); myProcess.waitForFinished(); if(!a.isEmpty()) { QFont font1; font1.setFamily("Courier"); font1.setFixedPitch(true); font1.setPointSize(10); font1.setBold(true); QTextEdit *errorWindow; errorWindow->setFont(font1); errorWindow->setText(a); errorWindow->show(); }To copy to clipboard, switch view to plain text mode
Bookmarks