Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.3.3
-
None
Description
Consider the following paintEvent() reimplementation:
void TilingWidget::paintEvent(QPaintEvent *event) {
QPainter painter(this);
painter.scale(1.0 / 3.0, 1.0 / 3.0);
for(int i = 0; i < 10; ++i) {
for(int j = 0; j < 10; ++j)
}
}
The expected result is that the entire painted area is yellow, since a yellow pixmap is painted on top of the blue background.
The actual result is that when the painter is scaled down by a number with infinite decimal expansion (1.0 / 3.0, for example), drawPixmap() does not work correctly, and artifacts show up. In the above example, parts of the blue background can be seen in recurring vertical and horizontal lines.