[solved] problem with the DropShadow



  • i created a DropShadow for an image, but i want it to be like a gradient not a solid color:
    !http://i.imgur.com/FAJG17f.png(IMG)!
    the code:
    @DropShadow
    {
    anchors.fill: background
    source: background
    horizontalOffset: -50
    verticalOffset: 0
    radius: 8.0
    samples: 16
    color: "#000000"
    }
    @



  • Hey, i had the same problem. Try it so:
    @
    DropShadow
    {
    anchors.fill: background
    source: background
    horizontalOffset: -50
    verticalOffset: 0
    radius: 8.0
    samples: 16
    color: "#000000"
    transparentBorder: true
    }
    @
    I don't know why but it helps :)



  • the shadow now is gone :-(



  • @
    Rectangle {
    width: 640
    height: 480
    color: "white"

        Rectangle {
            id: blackRect
            width: 200
            height: 50
            color: "red"
            visible: false
        }
    
        DropShadow {
            id: shadow
            anchors.fill: blackRect
            horizontalOffset: 0
            verticalOffset: 5
            radius: 12
            samples: 24
            spread: 0.0
            color: "#000000"
            transparentBorder: true;
            source: blackRect
        }
    }
    

    @



  • PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT’S SOLVED.



  • thank you guys


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.