Hi,

I need to transfer data from a QIODevice to another. The simplest way is to read all the data from the source to memory, and write to the target .

Example:

Qt Code:
  1. void copy(QIODevice *source , QIODevice *target){
  2. target->write(source->readAll());
  3. }
To copy to clipboard, switch view to plain text mode 

However, the source may contains few hundred MB of data. It will hold a lot of memory during transfer. It is better to implement an async read and write operation , each time will only read/write a smalller amount of data. It should be not difficult to make by using bytesWritten and readyReady signal.

Before making my own class , I would like to ask is any there similiar class is already existed in Qt?

Thanks for any advise.