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

MultiEffect (shadow) not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.5.0
    • None
    • Windows

    Description

      Creating a drop shadow isn't working as expected. In attempting to create a minor shadow just under the Item, I use this code:

      Rectangle {
          id: rect
          property int rectHeight: 100
          property int rectWidth: 100
          property int rectRadius: 10
          property int shadowSize: 10
          x: 100
          y: 100
          height: rectHeight
          width: rectWidth
          radius: rectRadius
          color: 'lightblue'
      }
      
      MultiEffect {
          source: rect
          anchors.fill: rect
          autoPaddingEnabled: false
          paddingRect: Qt.rect(0, rect.rectRadius * (-1), rect.rectWidth, rect.rectHeight)
          shadowBlur: 1.0
          shadowColor: 'black'
          shadowEnabled: true
          shadowVerticalOffset: rect.shadowSize
      }
      

      And the result is attached.

      I may be doing something wrong, but this is how to do this, according to my interpretation of the docs.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mzimmers Michael Zimmers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes