Hi everybody,

i am trying to copy a File over the Network and i would like to show in a progressbar the status of copy..

I have tried this example but it takes to long.

i heard about QUrlOperator, but under QT 4 its not working..

Could somebody show me how to copy a big file over the network and show the status in a progressbar?

Qt Code:
  1. QFile src("W:\\1Data\\Public\\Transfer\\Notes.exe");
  2. QFile dst("notes.exe");
  3. if(!src.open(QFile::ReadOnly) || !dst.open(QFile::WriteOnly)) return;
  4.  
  5. qint64 len = src.bytesAvailable();
  6. ui.dlg->setRange(0,len);
  7. ui.dlg->show();
  8. char ch;
  9. while(!src.atEnd()){
  10. src.getChar(&ch);
  11. dst.putChar(ch);
  12. ui.dlg->setValue(ui.dlg->value()+1);
  13. qApp->processEvents();}
To copy to clipboard, switch view to plain text mode 
Thanks