I am trying to make QWidget transparent background, but all the codes I found here gave me black background altho it gives me a transparent background when I use it with MainWindow object but not Qwidget object!
some codes I used
q->setAttribute(Qt::WA_TranslucentBackground, true);
q->setAttribute(Qt::WA_NoSystemBackground);
q->setAttribute(Qt::WA_OpaquePaintEvent);
q->setAttribute(Qt::WA_NoBackground);
q->setStyleSheet("background:transparent;");
and yes q is an QWidget object