title: Qt: QPainter + GDI in the same widget?
body: <p>I'm trying to use the <a href="http://www.civilnet.cn/book/embedded/GUI/Qt4/ch20lev1sec1.html" rel="nofollow noreferrer">method described here</a> to use a QPainter and GDI calls on the same widget.<br>
  Unfortunately this tutorial seem to have been written on an earlier version of Qt and now it does not work.</p>
  
  <p>I set the <code>WA_PaintOnScreen</code> flag and reimplement <code>paintEngine()</code> to return NULL.</p>
  
  <p>Then on the <code>paintEvent()</code> I create a QPainter, use it and then use some GDI calls to paint a bitmap. The GDI calls work fine but the QPainter does nothing. I get the following error on the console:</p>
  
  <pre><code>QPainter::begin: Paint device returned engine == 0, type: 1
  </code></pre>
  
  <p>Is this simply not supported anymore? how can I do it?</p>
  
  <p>I've also tried creating an additional widget on top of the GDI-painting widget but that didn't go well as well since the top widget appears black and blocks the GDI widget.</p>