View Full Version : Avoid the qt_flush on my main widget

28th September 2010, 14:15

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 :

QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();

HDC widget_dc = widget->getDC();

QRect wbr = br.translated(-wOffset);
BitBlt(widget_dc, wbr.x(), wbr.y(), wbr.width(), wbr.height(),
d->image->hdc, br.x() + offset.x(), br.y() + offset.y(), SRCCOPY);

(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,