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

QGraphicsEffects in High dpi mode with clipped children



    • Commits:


      Using QGraphicsEffects with high dpi mode can lead to a wrong clip being used.

      The two attached example projects both set Qt::AA_EnableHighDpiScaling, add a QGraphisEffect on a parent widget that has a clipped child widget.

      The first test case is the minimal test case, reduced to only what is necessary.

      In the second test case is a bit bigger, since it uses a QScrollArea.

      In the first test case, the parent widget has a height of 400px, and button is placed at y = 300 px with height 200px. Thus the top 100px of the button should be visible and the bottom 100px of the button should be clipped away by the parent.

      A yellow QGraphicsDropShadow effect is applied to the parent widget.

      The attached screenshot shows how this test case looks with:
      (From left to right)
      1) No high dpi scaling + no graphics effect
      2) No high dpi scaling + graphics effect
      3) High dpi scaling + no graphics effect
      4) High dpi scaling + graphics efect

      I've upload a patch for this issue to codereview: https://codereview.qt-project.org/#/c/177407/

      That patch also fixes https://bugreports.qt.io/browse/QTBUG-55698, and thus I've assigned this bug to you, too.


        1. firstTestCase.zip
          1 kB
        2. secondTestCase.zip
          1 kB
        3. testCase3.zip
          1 kB
        4. testcase-screenshots.png
          24 kB

          Issue Links

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



              • Assignee:
                tuheimon Tuomas Heimonen
                dt Daniel Teske
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:

                  Gerrit Reviews

                  There are no open Gerrit changes