QT QWidget how to achieve border shadow, using many methods are not good, the background is always black

I now have a parent window that is QWidget, with a lot of QLabel controls in it. I want to achieve the edge shadow of QWidget.
looks for various methods such as paintEventgraphics, etc., either have no effect, or the entire parent window QWidget becomes transparent, or the parent window background darkens.

such as this

    QGraphicsDropShadowEffect *wndShadow = new QGraphicsDropShadowEffect;
    wndShadow->setBlurRadius(9.0);
    wndShadow->setColor(QColor(0, 0, 0, 160));
    wndShadow->setOffset(4.0);
    mainWidget->setGraphicsEffect(wndShadow);

I would like to achieve a QWidget parent window edge shadow effect
ask everyone, thank you!

May.11,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39cd4-2c1d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39cd4-2c1d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?