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

OSX: clipping region in paintEvent(QPaintEvent*) broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.0 Beta1
    • Fix Version/s: 5.3.0 RC1
    • Component/s: GUI: Painting
    • Labels:
      None
    • Platform/s:
      macOS
    • Commits:
      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

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

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            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