I would like to execute a shell command using qprocess, but I would like to pass diferent arguments:
arguments << "-c" << "gksudo -- mount -o loop /media/100GB/test.iso /media/iso";
process->start(prog , arguments);
process->waitForFinished();
qDebug() << tmp;
ui.textEdit->append( "Path to file: " + ui.label_dir->text() + ui.label_file->text() );
ui.textEdit->append(tmp);
QString prog = "/bin/bash";
QStringList arguments;
arguments << "-c" << "gksudo -- mount -o loop /media/100GB/test.iso /media/iso";
QProcess* process = new QProcess(this);
process->start(prog , arguments);
process->waitForFinished();
QString tmp = process->readAll();
qDebug() << tmp;
ui.textEdit->append( "Path to file: " + ui.label_dir->text() + ui.label_file->text() );
ui.textEdit->append(tmp);
To copy to clipboard, switch view to plain text mode
like these:
arguments << "-c" << "gksudo -- mount -o loop" << "/media/100GB/test.iso" << "/media/iso";
arguments << "-c" << "gksudo -- mount -o loop" << "/media/100GB/test.iso" << "/media/iso";
To copy to clipboard, switch view to plain text mode
How can I do that?
Bookmarks