PDA

View Full Version : customize shadow effect form



MrCoder
17th May 2016, 10:45
Hi, I want to make a custom window and let it shadow effects
To do this I used the following code, but do not work

ApplicationWindow {
id: win
flags: Qt.FramelessWindowHint | Qt.NonModal
DropShadow {
anchors.fill: parent
horizontalOffset: 3
verticalOffset: 3
radius: 8.0
samples: 17
color: "#80000000"
source: parent
}
}

wysota
24th May 2016, 07:04
You cannot paint outside the window thus the code above will not work. You need a window with translucent background and paint the shadow inside the window geometry. Try adding the translucent background flag to your window and maybe it will work.