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

QPen::setStyle( Qt::DashLine ) cause a loop in paintRect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • Some future release
    • 4.4.0, 5.6.0
    • GUI: Painting
    • None

    Description

      Setting the QPen style to Qt::DashLine in the following example will cause the painting of the zoomed
      clipped rect to not return.

      This issue was reported on X11 and not reproduced on Windows

      Example code:

      QPen pen( Qt::gray );

      pen.setStyle( Qt::DashLine );

      QPoint offset(30, 30);
      qreal zoom = 30.0;
      QRectF rect(0, 0, 100, 100);
      QPainter painter(this);
      painter.translate( -offset );
      painter.setRenderHint( QPainter::Antialiasing );
      QRectF clipRect = event->rect().translated( offset );
      painter.setClipRect( clipRect );
      painter.scale( zoom, zoom );
      painter.setPen( pen );
      painter.drawRect( rect );

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes