I have a serious problem with Qt.

When I receive a WM_ERASEBKGND window message, I let my owner application draw my widget's background.

But after, Qt continue and it fall in this instruction :
Qt Code:
  1. QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();
  3. HDC widget_dc = widget->getDC();
  5. QRect wbr = br.translated(-wOffset);
  6. BitBlt(widget_dc, wbr.x(), wbr.y(), wbr.width(), wbr.height(),
  7. d->image->hdc, br.x() + offset.x(), br.y() + offset.y(), SRCCOPY);
  8. widget->releaseDC(widget_dc);
To copy to clipboard, switch view to plain text mode 

(in qwindowsurface_raster)

Which redraw the surface to a color I don't want. The objective is to have my widget transparent to show the main application style (in Delphi or I don't know). But when I put it to transparent, it's displayed in black

Can you help me ?

Thank you very much,