Hi all,

Qt Code:
  1. void WebView::paintEvent(QPaintEvent *event){
  2. QWebView::paintEvent(event);
  3. QPainter p(this);
  4. p.setCompositionMode(QPainter::CompositionMode_Clear);
  5. p.fillRect(10, 10, 100, 100, Qt::transparent);
  6. }
To copy to clipboard, switch view to plain text mode 

I override the paintEvent on WebView, so that the transparent window can be made.
My question is that all the element within this window are cleared. I want my web element in website overlay on top of this window.
For example, my website has transparent body, and I have a <div> with alpha 0.5. When the div overlay on the transparent window, all things are cleared within window.
What I want to do is showing this div with alpha 0.5.

Do you guy have any suggestions? I doubt that the solution can be solved by swap the position of QWebView:aintEvent(event); to the end, such that
Qt Code:
  1. void WebView::paintEvent(QPaintEvent *event){
  2. QPainter p(this);
  3. p.setCompositionMode(QPainter::CompositionMode_Clear);
  4. p.fillRect(10, 10, 100, 100, Qt::transparent);
  5. QWebView::paintEvent(event);
  6. }
To copy to clipboard, switch view to plain text mode 

But it make a segfault.