Hi,

I'm looking for a function to copy a file from a directory to another ... but this function is not located in that class.

Where could I find this function ?

Then I search a little bit and I discover a class nammed QUrlOperator, is that class could do what I want on a windows file system ? If yes how does it works ?

I code the two following slots
Qt Code:
  1. void testDialog::init()
  2. {
  3. QString message;
  4. QUrlOperator op("c:\\user\\AFile.txt");
  5. QUrlInfo fi = op.info("c:\\user\\AFile.txt");
  6. message = "Filename = " + fi.name();
  7. write(message);
  8. }
  9.  
  10. void testDialog::write( const QString &line )
  11. {
  12. lb->insertItem(line);
  13. lb->setBottomItem(lb->count()-1);
  14. }
To copy to clipboard, switch view to plain text mode 

... but it does not write the file name, what's wrong with my code ?

Thanks in advance.