Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
6.1.2
-
None
Description
We are currently getting a different result when using the same QPainter calls on QImage versus QWidget. This is problematic for us because we want to use QImage for caching (and also benefit from QPainter drawing in a separate thread).
The difference we see is the following:
- When drawing lines with QPainter to QWidget with Antialiasing on, the lines are drawn smoothly, and in the color, we set for QPainter - the lines are all plain white in our example. This is what we expect.
- When drawing lines with QPainter to QImage with Antialiasing on, the lines are drawn smoothly, but they seem to get mixed with the color from the background - the lines are all grey in our example. This is not what we expect.
(In code there are two commented calls to fillWhite())
This is an oversimplified example of course, but how can the correct result be achieved with antialiasing turned on and drawing lines?