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

Details

    • 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)

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes