I have this code, that works
QFile source(sourceFile);
source.open(QIODevice::ReadOnly);
QFile destination(newName);
destination.open(QIODevice::WriteOnly);
QByteArray buffer;
int chunksize = 200;
while(!(buffer = source.read(chunksize)).isEmpty())
{
destination.write(buffer);
}
destination.close();
source.close();
What chunksize should I use, if I want to copy big files (2-10 GB) ? Is this code efficient, or it should be better than just copying chunks.