You already have the code. Connect the signal from whatever widget the user uses to actually attempt to start the program to a slot containing the code from your first post. You do not need to connect the checkbox to anything unless you want the program to launch every time the checkbox is clicked.
// slot
void goForthAndExecute()
{
// QProcess commandProcess;
if (ui->check2pass->isChecked()){
args << "-pass"; args << "2";
}
commandProcess.start("C:/ffmpeg.exe",args);
}
// slot
void goForthAndExecute()
{
// QProcess commandProcess;
QStringList args;
if (ui->check2pass->isChecked()){
args << "-pass"; args << "2";
}
commandProcess.start("C:/ffmpeg.exe",args);
}
To copy to clipboard, switch view to plain text mode
Bookmarks