Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13675

setClipPath doesnt work correctly on Symbian^3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 4.6.3
    • GUI: Painting
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jhautaka Jani Hautakangas
            daveaspy David Aspinall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes