Windows .exe in Qt-Anwendung ausführen

Die Aufgabe war es, eine Qt Quick Anwendung (GUI) zum Upload neuer Firmware auf einen Touch-Controller zu schreiben.
Die Upload-Software wurde vom Hersteller in einer .exe-Anwendung bereitgestellt, die ein .bin-File auf den Touch-Controller lädt.
Verwenden wollte ich dafür die Qt-Classes "QProcess", mit der man Shell-Anwendungen aufrufen und steuern kann. Auf Linux-Seite hatte ich das schon des Öfteren erfolgreich verwendet - aber auf Windows wollte es zuerst nicht klappen.

QProcess::setWorkingDirectory

Der "Trick" bzw. die Lösung dafür war die Verwendung von "setWorkingDirectory". Hier ein Auszug aus der .h- und .cpp-Datei. Bitte beachten Sie in der .cpp-Datei die Zeile "process->setWorkingDirectory...".
cmdlauncher.h

#ifndef CMDLAUNCHER_H
#define CMDLAUNCHER_H

#include <QObject>
#include <QtQuick>
#include <QDebug>
#include <QProcess>
#include <QVariant>
#include <QString>
#include <QDir>

class CmdLauncher : public QProcess
{
    Q_OBJECT

public:
    CmdLauncher(QObject *parent = nullptr);

    Q_INVOKABLE void start(const QString &program, const QVariantList &arguments);

    QString application_directory;
};

#endif // CMDLAUNCHER_H

cmdlauncher.cpp

#include "cmdlauncher.h"

CmdLauncher::CmdLauncher(QObject *parent) : QProcess(parent)
{
    process_running = "start";
}

void CmdLauncher::start(const QString &program, const QVariantList &arguments) {
    QStringList args;

    // convert QVariantList from QML to QStringList for QProcess/
    for (int i = 0; i < arguments.length(); i++)
        args << arguments[i].toString();

    // start request or upload process
    QProcess * process = new QProcess();
    process->setWorkingDirectory(application_directory + "/nConsoleTool");
    process->setProcessChannelMode(QProcess::MergedChannels);
    process->start(program, args);
    process->waitForFinished();

    // get values and set states
    QByteArray bytes = process->readAll();
    cmd_output = QString::fromLocal8Bit(bytes);
    emit cmdOutputChanged();
    }
}

main.qml

import QtQuick 2.9
import QtQuick.Window 2.3
import QtQuick.Controls 2.5
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.3
import CmdLauncher 1.0

ApplicationWindow {
    id: application_window
    visible: true
    width: 1024
    height: 768
    title: qsTr("Firmware Tool")

    CmdLauncher {
        id: launcher
    }

    Button {
        id: nUpdateFW
        x: 260
        y: 20
        width: 200
        height: 30
        text: "Upload Firmware"

        onClicked: {
            //console.log(launcher.application_directory + "/nConsoleTool/nUpdateFW.exe");
            if (file_path == "") {
                fileMissing.open();
            } else {
                launcher.start(launcher.application_directory + "/nConsoleTool/nUpdateFW.exe", [ file_path, "-ba" ]);
                if (launcher.controller_detected == false) {
                    controllerMissing.open();
                }
            }
        }
    }
}