fairly new to Qt.
I'm using QProcess to run an external shell script and redirecting the output to a textBrowser on my GUI. Code:
In mainwindow.h:
private:
QProcess *myProcess;
and mainwindow.cpp:
void MainWindow::onButtonPressed(){
myProcess = new QProcess(this);
myProcess->connect(myProcess, SIGNAL(readyRead()), this, SLOT(textAppend()));
myProcess->start("./someScript.sh", arguments);
}
void MainWindow::textAppend(){
ui->textBrowser->append(myProcess->readAll());
}
This works perfectly to run an external script. My question is how to apply the same process with the script included as a resource file.
I've tried simply replacing "./someScript.sh"
with the resource version ":/someScript.sh"
but it does not seem to work.
The resource script runs perfectly, but the console output disappears.