Hello everybody,

I have got stucked somewhere in my code.
I want to copy all the content from one directory to another, means copy data from source to destination.
I have written the below code, But its not working
And i dont know why

Qt Code:
  1. QScopedPointer<QProcess> my_process(new QProcess());
  2.  
  3. QString source = parent_path;
  4. source.append(QDir::separator());
  5. source.append("*");
  6.  
  7. QString destination = map_path;
  8. destination.append(QDir::separator());
  9.  
  10. qDebug() << "Source : " << source;
  11. qDebug() << "Destination : " << destination;
  12.  
  13. QStringList arguments;
  14. arguments << "-rf"
  15. << source
  16. << destination;
  17. my_process->start("cp", arguments);
  18.  
  19. qDebug() << "Copied : " << my_process->waitForFinished();
  20. qDebug() << my_process->errorString();
To copy to clipboard, switch view to plain text mode 

Please tell me what is the problem in my code.,??????