I am trying to find a way to composite colors off screen, using Qt4 API. My code just needs to paint a solid rectangle, with on 1 color. The problem is that the color will be computed according to different parameters, and I would prefer to computer the color off screen and then painting it once on screen. instead of using Qt4 API and painting the same place several times.

Besides computing the color "manually", what are my options?