title: Setting QTextDocument painter's rectangle (where to paint)
body: <p>I am painting on a window simple html using QTextDocument::drawContents(painter)</p>
  
  <p>I want to do the drawing inside some margins in the window but I don't see a direct way to specify the target rectangle of the painting (in the painter/window).</p>
  
  <p>I guess a few ways to do it: </p>
  
  <ul>
  <li><p>Using the QTextDocuments::setMargin (although this does not allow different values for left/top.</p></li>
  <li><p>Placing the html into an styled <code>&lt;div&gt;</code></p></li>
  <li><p>Applying a translation transform to the painter.</p></li>
  </ul>
  
  <p>But all this seems a bit too much for what I want to do and I guess if I a missing something straight (as you do with QPainter::drawText where you tell the target rectangle)</p>