I am using following code to set the transparency for child widget but the output is showing as full white.

setAttribute(Qt::WA_NoSystemBackground, true);
setAttribute(Qt::WA_TranslucentBackground, true);
setAttribute(Qt::WA_PaintOnScreen);

I set the opacity but nothing happen to QWidget.

How to set transparency to child QWidget which derived from parent?