I suppose the problem is here:
Qt Code:
  1. QByteArray line = file.readLine();
  2. QString om(line);
To copy to clipboard, switch view to plain text mode 
Using readLine doesn't make sense with binary files. And there is no need to convert binary data to unicode.