Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGraphicsDropShadow effect on multiple objects



  • It seems that I can't use the same effects object and apply it to multiple objects? Is there a way around this. It's painful to create a seperate graphics object for each individual object.

    @ QGraphicsDropShadowEffect *effect =new QGraphicsDropShadowEffect;
    effect->setBlurRadius(15);
    effect->setOffset(0,0);

    ui->Label_1->setGraphicsEffect(effect);
    ui->Label_2->setGraphicsEffect(effect);
    ui->Label_3>setGraphicsEffect(effect);@
    

    The above code applies the effect only to the last label.


Log in to reply