i want to execute the script file in qt,i used Qprocess to execute my script file.i getting error "premission denied",so i used chmod methos to execute my script file in qt,after that i execute my qt,,again i getting same error,please help me to recover thsi problem
Thanks in advance
my code below:
Qt Code:
  1. int Widget::call()
  2. {
  3. if(directory1.exists(folder))
  4. {
  5. qDebug()<<"directory exist";
  6. directory1.cd(folder);
  7. QProcess opendir;
  8. QStringList arguments;
  9. QString program = folder;// "/home/digital"
  10. arguments <<"./samp.sh"; //"textfile"
  11. opendir.start(program, arguments);
  12. opendir.setProcessChannelMode(QProcess::ForwardedChannels);
  13. status = opendir.waitForFinished();
  14. if (!status)
  15. {
  16. qDebug()<< opendir.errorString()<<"error";
  17. return FAIL;
  18. }
  19. else
  20. {
  21. return SUCCESS;
  22. }
  23. }
  24. else
  25. {
  26. qDebug()<<"diretory not exist";
  27. }
  28.  
  29. }
To copy to clipboard, switch view to plain text mode