// 1、设置无边框,背景透明
this->setWindowFlags(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground);
// 2、设置阴影边框;
QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect(this);
// 阴影偏移
shadowEffect->setOffset(0, 0);
// 阴影颜色;
shadowEffect->setColor(QColor(92, 93, 102, 51));
// 阴影半径;
shadowEffect->setBlurRadius(30);
// 给窗口设置上当前的阴影效果;
this->setGraphicsEffect(shadowEffect);