c++ - Qt:在窗口后面模糊

标签 c++ qt blur

我有 2 个小部件:
widgets
其中一个是背景(半透明),第二个包含其他小部件(无背景)
我可以像这样在 window 后面做模糊吗?
enter image description here

最佳答案

I have 2 widgets: One of them is background(semi-transparent), second contains other widgets(without background)

QLCDNumber就是这种小部件。

这是可行的,其中一个很好的例子是:C++,Qt QMainWindow Transparent Background Example .但是,如果您需要使其半透明或降低透明度,您可以执行以下操作:

// mind the last component of rgba
mainwindow->setStyleSheet("QMainWindow{background-color: rgba(255, 255, 255, 127)};");

关于c++ - Qt:在窗口后面模糊,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34599240/

相关文章:

c++ - 试图为矩阵重载 * 运算符

c++ - 在 windows 和 solaris 之间以二进制格式交换数据有哪些可能的方法?

c++ - 寻找质因数 C++

qt - 将 Borland C++ Builder 移植到 Qt

c# - 如何从 QByteArray 获取结构

c++ - Qt C++ 项目的简单安装程序,仅针对 Windows

Android blur Bitmap Portion(finger touch portion)/使位图的某些区域在触摸时模糊

javascript - div失去焦点时如何关闭div?

jQuery - 防止自动完成选择触发模糊()

c++ - 以下代码片段 C++ 的说明