Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
4.6.3
-
Symbian^3 - 0.9 emulator (originally seen on N8 prototype device)
Description
When setClipPath is called with a path that is not rectangular the following paint operations are not clipped to the path but rather the bounding rectangle of the path. The exact same code running on Series 60 version 5.0 works as expected.
void rounding::paintEvent( QPaintEvent* paintEvent )
{
// Call base class
QMainWindow::paintEvent( paintEvent );
QPainter painter(this);
// create path with rounded rectangle in it
QPainterPath path;
path.addRoundedRect(20, 20, 40, 40, 20, 20);
// Set the clip path - any future drawing with this QPainter should be clipped to this path
painter.setClipPath( path );
painter.fillRect( 20, 20, 40, 40, QBrush( QColor( Qt::red ) ) );
// Draw the clip path also so we can be sure it is correct
painter.drawPath( path );
}
Example app to follow.