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

Inner shadow for background rectangle not work properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.0
    • None
    • Windows 7 x64 SP1, Nvidia GeForce GT 630
      Android 4.4.4 (OpenGL ES 3.0 V@45.0)

    Description

      Trying to make inner shadow for background rectangle of quick control. For example for background of Pane in BusyIndicatorPage of Qt Quick Controls 2 gallery example like this:

          background: Rectangle {
              color: "white"
              layer.enabled: true
              layer.effect: InnerShadow {
                  cached : true
                  color: "black"
                  samples: 32
                  radius: 16
                  spread: 0.5
              }
          }
      

      There is no shadow at all:

      Here http://stackoverflow.com/questions/27484767/inner-shadow-on-qml-rectangle found a workaround related to QTBUG-27213 to set source of InnerShadow to the item above the item I'm trying cast a shadow within.

      This workaround works for usual rectangle on the page, but not works for background rectangle (more precisely item with rectangle).

      InnerShadow stars works (in both cases: in code above or in workaround) when there is offset. On the pic there is a result when 1px horizontal offset is set, there still no shadow on top and bottom edges (until vertical offset).

      Attachments

        1. noshadow.png
          noshadow.png
          15 kB
        2. works_w_offset.png
          works_w_offset.png
          18 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            lukegluke Oleg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes