Don't clear QWidget on paintEvent.
I want paintEvent of a QWidget to paint some QPixmaps onto the widget. I then update() the widget from a seperate thread. However each time I do this, the old drawn picture is automatically removed. In the API documentation I found the following under the QWidget update() slot:
bq. Qt normally erases the widget's area before the paintEvent() call.
It seems weird that it is only "normally" updates.
Anyway, is there anyway I can block the QWidget to clear before the paintEvent? I want to draw a couple of pictures next to each other.
Did you read about "Qt::WA_OpaquePaintEvent":http://developer.qt.nokia.com/doc/qt-4.8/qt.html#WidgetAttribute-enum ?
Thanks, that worked