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

[REG 4.x->5.x] QPainter in paintEvent() doesn't work with Qt::WA_PaintOnScreen

XMLWordPrintable

    • 71c3aab7ba (qt/qtbase/dev) 71c3aab7ba (qt/tqtc-qtbase/dev) f4eb4c5f30 (qt/qtbase/6.4) f4eb4c5f30 (qt/tqtc-qtbase/6.4) bf4517f435 (qt/tqtc-qtbase/6.2) 9caae71cfb (qt/tqtc-qtbase/5.15)

      Using QPainter in paintEvent() with attribute Qt::WA_PaintOnScreen doesn't work with Qt5 (works with Qt4).
      Console output:

      QWidget::paintEngine: Should no longer be called
      QWidget::paintEngine: Should no longer be called
      QWidget::paintEngine: Should no longer be called
      QPainter::begin: Paint device returned engine == 0, type: 1
      

      I know, that I can override paintEngine() and return nullptr and draw using X11 functions, but QPainter is much simpler and faster to use.

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

            liaqi Liang Qi
            zaps166 Błażej Szczygieł
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes