I just try copy image with QDataStream. But failed

Qt Code:
  1. QFile file("../olongia.png");
  2. file.open(QIODevice::ReadOnly);
  3.  
  4. QDataStream ods(&file);
  5. ods.setVersion(QDataStream::Qt_4_2);
  6.  
  7.  
  8.  
  9. QFile ftulis("../coba.png");
  10. ftulis.open(QIODevice::WriteOnly);
  11.  
  12. QDataStream wds(&ftulis);
  13. wds.setVersion(QDataStream::Qt_4_2);
  14.  
  15. wds << ods;
  16.  
  17. ftulis.close();
  18.  
  19. file.close();
To copy to clipboard, switch view to plain text mode 

Have any suggestion ?


Sorry, my english is bad