PDA

View Full Version : Transparent Partial Window on QWebKit



horoma
15th November 2012, 10:45
Hi all,

Recently, I have some problems about making the browser transparent and see thought the desktop.
I can make the full transparent of browser by setting the alpha for the application and qwebpage.

But, I want to make partial windows on browser to be transparent now. For example, I want to set a box on window to be transparent only, and the other region is not.

Do you have any suggestion? Thank you very much.

ugluk
15th November 2012, 14:49
You first need to obtain a QWidget*, to the widget, which may not be possible as the WebKit includes it's own controls. After you have the pointer, you can set an attribute, say Qt::WA_TranslucentBackground. You can also play with the background color/brush of the widget and, of course, any other color/brush, by setting alpha values in it. If results are unsatisfactory, you can write a custom QWidget.