You could make it either blocking or non-blocking. It depends on whether you would like to block your main process or run the shell script in the background in an async mode.
Also, since you do not need the output, you do not even need to instantiate here, just use the static methods.
#include <QString>
#include <QFileDialog>
#include <QProcess>
#include <QDebug>
...
// Get this file name dynamically with an input GUI element, like QFileDialog
// or hard code the string here.
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Script"), "/", tr("Script Files (*.sh)"));
if (QProcess::execute(QString("/bin/sh ") + fileName) < 0)
qDebug() << "Failed to run";
#include <QString>
#include <QFileDialog>
#include <QProcess>
#include <QDebug>
...
// Get this file name dynamically with an input GUI element, like QFileDialog
// or hard code the string here.
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Script"), "/", tr("Script Files (*.sh)"));
// Uniform initialization requires C++11 support, so you would need to put
// this into your project file: CONFIG+=c+11
if (!QProcess::startDetached("/bin/sh", QStringList{fileName}))
qDebug() << "Failed to run";