Hello.
My implementation of 'paintEvent' is giving a particular result:

Qt Code:
  1. void Widget::paintEvent( QPaintEvent * event )
  2. {
  3. QPainter p ( this );
  4. p.setPen( QPen( QBrush( Qt::darkRed ), 2 ) );
  5. p.setBrush( QBrush( Qt::gray ) );
  6.  
  7. QPainterPath myPath;
  8. myPath.moveTo( 600.0, 250.0 );
  9. myPath.cubicTo( 90.0, 50.0, 0.0, 50.0, 50.0, 370.0 );
  10. myPath.cubicTo( 140.0, 20.0, 10.0, 10.0, 600.0, 250.0 );
  11.  
  12. myPath.addRect( 10.0, 300.0, 160.0, 34.0 );
  13.  
  14. QPainterPath result ( myPath.simplified() );
  15. p.drawPath( result );
  16. }
To copy to clipboard, switch view to plain text mode 

Looking like this:


Shouldn't the intersected region between the rectangle and the bezier path be filled in the path generated by the 'simplified' call?