Quoting the docs:
Quote Originally Posted by Rich Text Document Structure docs
Images
Images in QTextDocument are represented by text fragments that reference external images via the resource mechanism. Images are created using the cursor interface, and can be modified later by changing the character format of the image's text fragment:
Qt Code:
  1. if (fragment.isValid()) {
  2. QTextImageFormat newImageFormat = fragment.charFormat().toImageFormat();
  3.  
  4. if (newImageFormat.isValid()) {
  5. newImageFormat.setName(":/images/newimage.png");
  6. QTextCursor helper = cursor;
  7.  
  8. helper.setPosition(fragment.position());
  9. helper.setPosition(fragment.position() + fragment.length(),
  10. QTextCursor::KeepAnchor);
  11. helper.setCharFormat(newImageFormat);
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 
The fragment that represents the image can be found by iterating over the fragments in the text block that contains the image.