创建模糊效果

Qt Quick Effect Maker 中创建模糊效果:

  1. 在节点树中添加一个FastBlur 节点。
  2. 在节点树中添加一个BlurHelper 节点。所有包含模糊效果的特效都需要BlurHelper 节点。

    节点图中的 Main、BlurHelper、FastBlur 和 Output 节点垂直连接

  3. 选择FastBlur 节点,并在设置中更改fastBlurAmount 值,以控制模糊的程度。

    应用了模糊效果的 Qt 徽标

调整项目边界

效果会出现裁剪。您需要调整项目边框:

  1. 选择十字图标 以显示项目边框。

    具有模糊效果和可见项目边框的 Qt 徽标

  2. 转到Edit >Project Settings
  3. 将所有边的项目填充设置为 100。

    项目设置对话框,项目填充设置为 100

现在,您可以看到完整的模糊效果。

具有完整模糊效果和扩展衬垫的 Qt 徽标

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.