经过验证,通过代码:
this->setAttribute(Qt::WA_TranslucentBackground, true);
在 UOS 上,可以实现窗口透明;
在 Windows 上,则本应透明的部分是全黑。
为了解决该问题,windows 平台需要加上如下代码才能实现透明:
this->setWindowFlag(Qt::FramelessWindowHint);
(SAW:Game Over!)
经过验证,通过代码:
this->setAttribute(Qt::WA_TranslucentBackground, true);
在 UOS 上,可以实现窗口透明;
在 Windows 上,则本应透明的部分是全黑。
为了解决该问题,windows 平台需要加上如下代码才能实现透明:
this->setWindowFlag(Qt::FramelessWindowHint);
(SAW:Game Over!)