Why don't you just create an empty QImage and draw on that instead of clearing the one you have?