Qt 控件添加阴影效果


    QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this);
    shadow_effect->setOffset(5, 5);
    shadow_effect->setColor(QColor(43, 43, 43));
    shadow_effect->setBlurRadius(8);
    
    QLabel* pLabel = new QLabel(this);
    pLabel->setGraphicsEffect(shadow_effect);

阴影效果如图:












你可能感兴趣的:(Qt,Qt,阴影)