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

Applying shadows for multiple objects



  • How can i apply dropshadows to multiple objects?
    I tried QGraphicsDropShadowEffect class like this:

    effect_T = new QGraphicsDropShadowEffect();
    
    effect_T->setColor(QColor(167, 210, 218));
    effect_T->setBlurRadius(30);
    
    ui->tableWidget->setGraphicsEffect(effect_T);
    

    But if i use effect_T for multiple objects, it will apply shadow only for the last one.
    I don't want to create new effects for all objects separately, can i do something about this?



  • Well unfortunately you will have to create an "effect"" for each widget



  • Well unfortunately you will have to create an "effect"" for each widget