Qt QGraphicsDropShadowEffect is not showing

后端 未结 3 1351
我寻月下人不归
我寻月下人不归 2021-01-14 22:04

I am creating a custom widget my_widget inheriting from QWidget.

Here, I have a label to which I would like to apply QGraphicsDropSha

3条回答
  •  遥遥无期
    2021-01-14 22:47

    Works for me in C++. I did the following in a QDialog containing a QLabel object named titleLabel. I'm using Qt 4.8.4 on a Windows XP computer.

    QGraphicsDropShadowEffect* eff = new QGraphicsDropShadowEffect(this);
    eff->setBlurRadius(5);
    titleLabel->setGraphicsEffect(eff);
    

提交回复
热议问题