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

DropShadow doesn't work on rectangle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.2.1
    • None

    Description

      Hi,

      Code and a screenshot probably tells a lot more?
      Example code:

      import QtQuick 2.0
      import QtGraphicalEffects 1.0
      
      Rectangle {
          width: 800
          height: 600
      
          Rectangle{
              id: brContainer
              width: 500 + 16
              height: 50 + 16
              anchors.centerIn: parent
              border.color: "red"
              border.width: 1
      
              Rectangle {
                  id: blackRect
                  width: 500
                  height: 50
                  color: "black"
                  anchors.centerIn: parent
              }
          }
      
          DropShadow {
              anchors.fill: brContainer
              horizontalOffset: 3
              verticalOffset: 3
              radius: 16
              samples: 24
              color: "#80000000"
              source: blackRect
          }
      }
      

      As you can see in the example screenshot (generously provided by Sze Howe Koh) is no real shado at all. It's basically a copy of the element on the color set in DropShadow with the offset. But the actual blurred shado is nowhere to be found.

      Note if you run this in Linux. You might need to run the example code till about 10x before the DropShadow finally gets applied. That's another bug i'm filling after this one.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            markg85 Mark
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes