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

QGraphicsDropShadowEffect has undesired artifacts against dark background

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.1
    • Widgets: GraphicsView
    • None

    Description

      When QGraphicsDropShadowEffect is used against a white background the result is flawless, but when used against a dark background it leaves a rectangle shaped stripe clearly visible (if one looks for it) a bit outside the shadow.

      To reproduce I have used a QFrame of color #111111, a background of color #444444 and the QGraphicsDropShadowEffect of color #222222.

      To see the outer, brighter rectangle it requires that one looks for it but if one does it is clearly visible and clearly not desirable if one e.g. intends to release a commercial product. It does not look good at all. 

      I suspect that most people have used the shadow effect against a white background and therefore not spotted this. However, in my case I want to use the shadow effect against a darker background and I would expect it to work equally well against any background. 

      Below are two examples, one showing the shadow against dark background and the other against white background. I've zoomed in and increased the contrast to make it more clear on the image. When zoomed out to full size and use in my application it's not as easy to see on a screen shot but it's still very visible if one looks for it. 

      For more info, comments and image examples, see the following Stack Overflow post:

      https://stackoverflow.com/questions/74578630/pyqt6-drop-shadow-effect-leaves-undesired-outer-border-visible-against-dark-back

       

       

       

       

      Attachments

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

        Activity

          People

            bibr Andreas Aardal Hanssen
            bearify Björn Backman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes