Details
-
Bug
-
Resolution: Out of scope
-
P1: Critical
-
None
-
4.7.3
Description
STEPS LEADING TO PROBLEM:
1. QPainterPath path;
2. path.addRoundedRect(boundingRect(), 12, 12);
3. painter->fillPath(path, Qt::red);
EXPECTED OUTCOME:
Each corner of the rounded rectangle looks exactly the same except for being
mirrored from each other.
ACTUAL OUTCOME:
The rounded corners look different. When the corner radius is 12, the number of
pixels cut from each corner is as follows:
Top left: 12 + 8 + 6 + 5 + 4 + 3 + 2 + 2 + 1 + 1 + 1 + 1 = 46
Top right: 1 + 1 + 1 + 1 + 1 + 2 + 2 + 3 + 4 + 5 + 6 + 8 = 35
Bottom left: 11 + 7 + 5 + 4 + 3 + 2 + 1 + 1 = 34
Bottom right: 1 + 1 + 2 + 3 + 4 + 5 + 7 = 23
This makes the rounded rectangle look non-uniform and some of the corners don't
even look very rounded any more. If the corner radius is smaller, the problem
gets much worse.
Test case and screen shot as an attachment.