QPainter CompositionMode or Interactive PseudoColor Mapping

I have been playing with the 36 QPainter Modes [Composition and RasterOp] in order to achieve an additive paint application. I expected to be able to paint shapes(rectangles) over each other in a fashion that the overlap between two or more rectangles is another color (say bright red) while leaving the non-overlapping part the same (say dull green). The issue is that I expected the rectangle to add pixel values together first then utilize a colormap, colortable, palette to colorize the individual pixels based on intensity.
Perhaps CompostionMode is not the technique I should use. How can this be accomplished?
I’d like to see the changes as the rectangles are being painted for an interactive application.