You only have to modify your paintEvent code to apply the changes you'd do using the raster operation.