Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Are soft edge drop shadows possible? (as in the docs)
Forum Updated to NodeBB v4.3 + New Features

Are soft edge drop shadows possible? (as in the docs)

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qmldropshadow
1 Posts 1 Posters 561 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by SGaist
    #1

    Update: Ok, poking around for a while, it appears that the "transparentBorder" property needs to be set to true in order to get soft edges. Didn't see this mentioned in the docs.

    image

           DropShadow {
                anchors.fill: rect
                horizontalOffset: 20
                verticalOffset: 20
                radius: 16
                cached: true
                transparentBorder: true // <----------- TRUE
                fast: true
                samples: 16
                spread: 0
                color: "#80000000"
                source: image
            }
    

    Original Issue
    I've been unable to get a soft edge drop shadow on an image no matter what settings I try. The docs indicate that this is possibe by adjusting the DropShadow - Radius property but it's not working. I get the following result with the code below:

    image

    Am I doing something wrong or is this a bug/known issue?

        Rectangle {
            id:rect
            width: 320
            height: 240
            color: "blue"
    
            Image {
                id: image
                anchors.fill: parent
                source: "qrc:/images/image1.png"
            }
    
            DropShadow {
                anchors.fill: rect
                horizontalOffset: 10
                verticalOffset: 20
                radius: 8.0
                samples: 16
                spread: .2
                color: "#000000"
                source: image
            }
        }
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved