Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.7.0
-
None
-
Qt 4.7.0 on 64-bit Windows XP.
All Qt rendering parameters except ones set in the test code are at their default values.
Description
The attached test application has QGraphicsScene with one item that consists of:
- rectangle to show the item's bounds;
- semi-transparent text using QPainter::drawStaticText() (left digit) and QPainter::drawText() (right digit) functions.
The left part of the screenshot shows the result of calling QPainter::setPen() before drawing the rectangle.
As you can see, drawText() draws text correctly only when the font is large, while drawStaticText() completely ignores pen color and/or transparency.
On the right part of the screenshot you can see the result of calling setPen() after drawing the rectangle and scrolling the view upwards from the position when the item is out of view area.
In this case drawStaticText() and drawText() with small font create artifacts at the top edge of the view. drawText() with large font works correctly.
Also, drawStaticText() does only partial antialiasing — all lines except nearly-vertical ones are aliased.