title: Several ways of placing an image in a QTextEdit
body: <p>I think this is a very simple question, but when I copy an image I can't paste it in a QTextEdit? Paste is inactive! Also I would like to know <strong>how to drag-and-drop a picture.</strong></p>
  
  <p>BTW I use the following code in order to insert a picture into a QTextEdit:</p>
  
  <pre><code>QTextEdit *textEditor = new QTextEdit(0);
  QTextDocumentFragment fragment;
  fragment = QTextDocumentFragment::fromHtml("&lt;img src='C:\\aaa.jpg'&gt;");
  textEditor-&gt;textCursor().insertFragment(fragment);
  textEditor-&gt;setVisible(true);
  </code></pre>
  
  <p>Is it recommended? How do you do this operation?</p>