What should I do to fix the background black color?
-

When I use the code to create a widget which set the round corner border but failed.cause the widget border part is not transparent.
even though I had just setted the atrribute of the transparent.but the background of the qwidget was not setted to the transparent. so how to fix it.
setAttribute(Qt::WA_TranslucentBackground);
setAutoFillBackground(false); -
Hi,
Please provide a minimal buildable code sample that shows your issue.
Also, version of Qt and OS. -
QT 5.14.1 and windows 7 and windows 11
I found the error code line.
if I used the code like this:showNormal();//the qwidget slot function setAttribute(Qt::WA_TranslucentBackground);the dark part will appear.
and if remove the showNormal() function ,then the tranlucent would work.so is it a bug or something else?