Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt QML模糊效果_Qt_Qml - Fatal编程技术网

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
    }
}