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

        For Gerrit Dashboard: QTBUG-37918
        # Subject Branch Project Status CR V

        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