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

QGraphicsEffect::sourcePixmap render error when scaling to a extend

    XMLWordPrintable

Details

    Description

      When applying QGraphicsEffect and scaling the QGraphicsView to some extend, the sourcePixmap function render failed and produce the following message:

      QPainter::begin: Paint device returned engine == 0, type: 2
      QPainter::setRenderHint: Painter must be active to set rendering hints
      QPainter::setWorldTransform: Painter not active
      QPainter::setOpacity: Painter not active
      QPainter::setPen: Painter not active
      QPainter::setBrush: Painter not active
      QPainter::drawPath: Painter not active
      QPainter::end: Painter not active, aborted

      While if we disable QGraphicsEffect, we can scale the graphics view to infinite extend.
      The attached file is a simple program showing this problem, scaling the graphics view further more you will see the error message and the render error. In the demo I use QGraphicsOpacityEffect which calls sourcePixmap() internally to illustrate the problem.

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            aitjcize Wei-Ning Huang
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes