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

OSX: clipping region in paintEvent(QPaintEvent*) broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0 RC1
    • 5.3.0 Beta1
    • GUI: Painting
    • None
    • macOS
    • a7e8b400d1ca6cf4e23b02564812ea3ff0bb9015

    Description

      if an update for n≥2 rects in a window is requested, seemingly the background is erased for the enclosing rectange but updates are clipped to the actual region only.

      attached images:

      grey: the lower80% is a terminal widget which does precise update(…) calls where characters are modified.
      the window background is painted with
      void MemoryInspector::paintEvent(QPaintEvent*)

      { QPainter p(this); p.drawPixmap ( QRect(0,0,width(),height()), background );}

      the terminal widget repaints with:
      void SimpleTerminal::paintEvent(QPaintEvent*)

      { QPainter painter(this); painter.drawPixmap(0,0,*canvas);}

      note that the standard GUI widgets at the top are also cleared but not repainted.

      orange: here are some QLineEdits widgets on a window. They are updated on a timer which mostly updates only some widgets because mostly only some values change. seemingly unmodified (and not updating) widgets between updated widgets are cleared and not repainted.
      the window background is painted with:
      void Inspector::paintEvent(QPaintEvent*)

      { QPainter p(this); p.drawPixmap ( 0,0, background );}

      the QLineEdits are not subclassed.

      Attachments

        1. bad_clipping.zip
          16 kB
          Günter Woigk
        2. screen refreshed in Qt5.2.png
          66 kB
          Günter Woigk
        3. screen refreshed in Qt5.2 (2).png
          76 kB
          Günter Woigk
        4. screen refreshed in Qt5.3b1.png
          67 kB
          Günter Woigk
        5. screen refreshed in Qt5.3b1 (2a).png
          84 kB
          Günter Woigk
        6. screen refreshed in Qt5.3b1 (2b).png
          80 kB
          Günter Woigk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            kio Günter Woigk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes