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

QOpenGLWidget no longer repaint if a paint-on-screen widget is updated

    XMLWordPrintable

Details

    • All
    • 697e1b039 (dev), c198f7124 (6.7), 4e3c55e10 (6.6), f12634262 (tqtc/lts-6.5)

    Description

      Description:

      When a widget with the WA_PaintOnScreen flag is updated via QWidget::update(), paint events on sibling widgets are omitted.

      Reproduction steps:

      • Use one of the following test apps:
        1. Python option: PaintOnScreenIssue.py for PyQt5 or PySide2.
        2. C++/CMake option: PaintOnScreenIssue.tar.gz for QtCreator.
      • Launch the test app.
      • Click on the top widget and move the mouse pointer; the widget's background will change color as the mouse position changes.
      • After 5 seconds, the bottom widget will be updated, and the top widget will stop repainting (see attached video PaintOnScreenIssue.mp4).

      A more technical description:

      When QWidget::update() is called, a QEvent::UpdateRequest event is posted to the widget (or top level widget), and the QWidgetBackingStore::updateRequestSent private member is set, to avoid sending another event until the previous one has been processed. When the event is received, QWidgetBackingStore::sync() is invoked, and the private member is cleared, so that another update event can be posted.

      However, if the widget has been marked with Qt::WA_PaintOnScreen, QWidgetBackingStore::sync() is never invoked; the private member is never cleared. The backing store is typically shared with top level windows and its children. Because the private member is not cleared at the expected time, paint events are skipped, and widgets stop repainting.

      Attachments

        1. PaintOnScreenIssue.mp4
          578 kB
        2. PaintOnScreenIssue.py
          2 kB
        3. PaintOnScreenIssue.tar.gz
          1 kB
        4. QTBUG-80167_2.patch
          4 kB
        5. QTBUG-80167.patch
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            christian.aguilera.foundry Christian Aguilera
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: