QProcess and dd under linux

Hi,
I am trying without success to launch dd to copy one file with QProcess under linux.I want to wait that my dd command is finished.I have tried without successss with QProcess::execute and with Qprocess::startdetached (static functions). I don't know if I need a "/bin/sh -c" before my dd command or if I don't need "/bin/sh -c".the copy with dd doesn't happen.(This code that call QProcess and dd is in a secondary thread).I have tried with and without "/bin/sh -c" before dd.my dd command is like "dd if=source file of=destination file".

Once your problem is solved please do:
Use the Topic Tools button to mark as Solved and
Upvote the answer(s) that helped you to solve the issuepostimage.org can be used for screenshots.
Get on the inside track at https://www.qtworldsummit.com/

@mrjj Hi,
Ok I have debugged to find the problem and I have this error :

Object: Cannot create children for a parent that is in a different thread.
(Parent is TaskThread(0x1c08840), parent's thread is QThread(0x14449a0), current thread is TaskThread(0x1c08840)

the function that call this QProcess code is in the secondary thread "TaskThread". It seems it is not possible to call a method of QProcess like start or execute in this secondary thread (I am with Qt 5.6.0 under linux)
do you have any further idea ?

So maybe you just need to send a signal to thread and slot will start QProc.

Once your problem is solved please do:
Use the Topic Tools button to mark as Solved and
Upvote the answer(s) that helped you to solve the issuepostimage.org can be used for screenshots.
Get on the inside track at https://www.qtworldsummit.com/

@mrjj,jsulm,Hi again, I have a solution with system but as I have corrected two other errors I will try again with QProcess so I am not sure that the secondary thread was the error.so my first error : I had forgotten to create the destination path of the destination file (the subdirectory) so it made an error and the second error: I should have removed the character '\' of the source and destination file strings and put " before and after the two string of file (if="source" and of="destination".
with these two errors corrected it runs well with system(cmd) and I will try again now with QProcess and come back to report here if it works...

so it works too with QProcess::execute(cmd).
As I said previously I removed the character '\' that is in the strings source and destination before the spaces.I must still think about the accentued characters in the source and destination
files.