Qt QML模糊效果
我想整个屏幕必须在中央附近模糊。 我怎样才能做到Qt QML模糊效果,qt,qml,Qt,Qml,我想整个屏幕必须在中央附近模糊。 我怎样才能做到 FastBlur { x: 0 y: 0 height: Screen.desktopAvailableHeight width: Screen.desktopAvailableWidth source: video radius: 100 } //我想要这个没有模糊的正方形 Rectangle { x: 100 y: 100 height: 250 width:
FastBlur
{
x: 0
y: 0
height: Screen.desktopAvailableHeight
width: Screen.desktopAvailableWidth
source: video
radius: 100
}
//我想要这个没有模糊的正方形
Rectangle
{
x: 100
y: 100
height: 250
width: 250
color: "red"
}
使用z值
Window {
Rectangle {
z: 0
id: blurred_background
anchors.fill: parent
}
FastBlue {
z: 1
anchors.fill: parent
source: blurred_background
}
Rectangle {
z: 2
id: nonblurred_foreground
height: 250
width: 250
}
}
将矩形替换为您想要的任何项目!
并确保不要忽略文档中的警告 不,不,我的快速模糊源是视频输出,中心必须清晰
Window {
Rectangle {
z: 0
id: blurred_background
anchors.fill: parent
}
FastBlue {
z: 1
anchors.fill: parent
source: blurred_background
}
Rectangle {
z: 2
id: nonblurred_foreground
height: 250
width: 250
}
}