PDA

View Full Version : QWinWidget & transparency



kinju
7th June 2010, 12:49
Hello,

I have an application which give a window handle to a DLL. The DLL is in charge to add Qt components.

The problem is that I want keep the main application theme, so I would like my QWinWidget have a transparent background. But the transparency do not seems to work, it's displayed in black...

How can I solve this ?

Thanks

saa7_go
8th June 2010, 12:07
add this code to your QWinWidget constructor:



setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::FramelessWindowHint);