I´am developing an app with QT creator in linux and i''am with some difficults. I had already done this in windows and Mac without any problem(using similar techniques).
I include an executable which needs arguments in resources projects https://www.youtube.com/watch?v=sWIQIi4lg58 and seems like everything is ok. I tried to check the size of the file with path :/Aux/namefile and it gives the correct size.
QProcess *process = new QProcess(this);
QStringList arguments;
arguments<< "--help";
process->execute(":/Aux/namefile");
//already tried with start and no results too
//also tried sh.start(":/Aux/namefile",arguments) The arguments is a QStringList
process->write(arguments);
process->closeWriteChannel();
process->waitForFinished();
QString output = process->readAll();//already checked in readAllStandart(Output and error)
ui->outputLabel->setText(output);
The problem is .. i'am not getting any output. Any ideas about this ? Thank you in advance
My first problem is resolved and for that I have used
QFile::copy(":/path/to/file", "C:\\....\\file");
chmod 755 file
but now I have another problem how I can run this command as sudo ? doing in terminal I need to input the password. I don't find a good solution .. thank you in advance