Dear all,

I have shell script like this :

input=input parameter1=value1 parameter2=value2 \
parameter3=value3 \

Expected result: Input from ui (input, value1textEdit, value2textEdit, value3textEdit) will added to script >> print it to current directory (.sh) >> view that file using gedit.


Here my progress:


Qt Code:
  1. void Mark::on_btnProcess_clicked()
  2. {
  3.  
  4. QStringList str_input , str_command1, str_command2, str_command3;
  5. str_input = ui->inputtextEdit->text();
  6. str_command1 = ui->value1textEdit->text();
  7. str_command2 = ui->value2textEdit->text();
  8. str_command3 = ui->value3textEdit->text();
  9.  
  10. proc= new QProcess();
  11. proc->start("echo , QStringList() << "input="<< QString(str_input)<<"parameter1="<<QString(str_command1)<<"parameter2="<<QString(str_command2)<<"parameter3="<<QString(str_command23)<<">> test.sh");
  12. proc->start("gedit", QStringList() << "/current_dir/test.sh");
  13.  
  14. }
To copy to clipboard, switch view to plain text mode 

But its not working , any idea?


Thanks for advance,

Regard,