Sorry to disagree, but it's obvious you still don't understand what you're doing...
First off, are you trying to compress a file or uncompress a file? Your original post said you were trying to uncompress a file, but your [still] incorrect example, well, I'm no longer sure what you are trying to accomplish actually.
Secondly, you don't need to execute the bash shell, so no clue why you have added that. Even if you wanted to execute bash, the program variable would be bash and everything after bash in your example would be arguments to the bash program.
To be very clear, the program is the executable binary you are trying to execute and all of the arguments that need to be passed to that program need to be supplied as program arguments.
Even then, the example you posted attempts to compress file1.doc, sending the output to stdout (gzip -c), which you then direct (>) to file file1.zip and then you are supplying what, a random directory for some unknown reason.
I had already posted exactly what your program and program arguments variable should be. I don't know how to help you if you keep ignoring what I say and then you cobble together some incomprehensible code from what I can only imagine are the result of some mashup of different Google searches!
Use the example I already posted and come back with actual results, return codes, etc or else I literally don't know how to help you.
Edit: I hate myself for doing this

, but here's a working example for what you're trying to accomplish:
bool success;
gunzip.
setProcessChannelMode(QProcess::MergedChannels);
QStringList arguments
= {"-v",
"/Users/jefft/test.dat.gz"};
gunzip.start(program, arguments);
success = gunzip.waitForStarted();
if (!success)
{
qDebug("waitForStarted() error: %s", gunzip.errorString().toUtf8().constData());
return;
}
success = gunzip.waitForFinished();
if (!success)
{
qDebug("waitForFinished() error: %s", gunzip.errorString().toUtf8().constData());
return;
}
qDebug("%s", output.toUtf8().constData());
bool success;
QProcess gunzip;
gunzip.setProcessChannelMode(QProcess::MergedChannels);
QString program = "gunzip";
QStringList arguments = {"-v","/Users/jefft/test.dat.gz"};
gunzip.start(program, arguments);
success = gunzip.waitForStarted();
if (!success)
{
qDebug("waitForStarted() error: %s", gunzip.errorString().toUtf8().constData());
return;
}
success = gunzip.waitForFinished();
if (!success)
{
qDebug("waitForFinished() error: %s", gunzip.errorString().toUtf8().constData());
return;
}
QByteArray buffer = gunzip.readAll();
QString output = buffer;
qDebug("%s", output.toUtf8().constData());
To copy to clipboard, switch view to plain text mode
The code above will uncompress file test.dat.gz and produces the following output, which you would want to parse to get the uncompressed file name:
/Users/jefft/test.dat.gz: -99.9% -- replaced with /Users/jefft/test.dat
/Users/jefft/test.dat.gz: -99.9% -- replaced with /Users/jefft/test.dat
To copy to clipboard, switch view to plain text mode
The code above uses QProcess::waitFor*, which I don't recommend because your GUI will hang. Not a big deal if your files are small, but uncompressing a large file would noticeably hang your GUI. Start with this and once you have working, replace with started() and finished() signals connected to slots in your program.
Bookmarks