Say to Qt to never erase a specified widget background
-
Hi all,
I have a desktop application which have a widget where the handle (p->winId()) is passed to a graphic library in order to draw the content.
As this widget is the central widget of my main window, when I resize the window, the widget is also resized.
My problem is that Qt erase the background of the widget.
- When the widget is resized to a greater size, there is some flickering because Qt erase the background before I receive a WM_PAINT event
- When the size is smaller, I receive the WM_PAINT event, I draw the content and then, I don't know why, Qt erase it :(
Can you tel me what can I do ?
King Regards,
Kin -
You can set the "autoFillBackground":http://doc.qt.nokia.com/4.7/qwidget.html#autoFillBackground-prop property of QWidget to false.