Hi all

Look at this code

Qt Code:
  1. QString cmd = "some strings here";
  2. long buffer = 2048;
  3. QByteArray array;
To copy to clipboard, switch view to plain text mode 
I want get first 2048 byte from QString cmd to array in Utf8. Dont know how. Any suggestions?
And when i got first 2048 byte, how to take next bytes.
In QFile is simple

Qt Code:
  1. QFile file("file");
  2. QByteArray array = file.read(buffer);
  3. file.seek(buffer);
  4. array = file.read(buffer);
To copy to clipboard, switch view to plain text mode 

Ty for any help.