DropShadow over entire Rectangle
Unsolved
QML and Qt Quick
-
Hi guys... i have a piece of code like that:
Rectangle { id: root width: Screen.width height: patientName.height + 20 + rectangle2.height + 132 + gridView1.height + 20 color: "#00000000" Rectangle{ id: background anchors.topMargin: 50 anchors.centerIn: parent radius: 15 width: parent.width *2/3 height: root.height - 10 color: "#ffdbeef5" } DropShadow { anchors.fill: background horizontalOffset: -3 verticalOffset: -3 radius: 3 samples: radius * 2 color: "#80000000" source: background fast: true } }
my problem is that i need a show over the entire border of rectangle and I had test with every variant of combinations of the offset values, but I only get shadow in some part of the recatangle...
how can I do that ??
regards
-
Use RectangularGlow instead of Dropshadow and place it on top of your Rectangle.
Rectangle { id: root width: Screen.width height: patientName.height + 20 + rectangle2.height + 132 + gridView1.height + 20 color: "#00000000" RectangularGlow { anchors.fill: background glowRadius: 1 spread: 0 cornerRadius: 10 color: "#80000000" } Rectangle{ id: background anchors.topMargin: 50 anchors.centerIn: parent radius: 15 width: parent.width *2/3 height: root.height - 10 color: "#ffdbeef5" } }