Quantcast
Channel: Qt DevNet forums: Qt WebKit
Viewing all articles
Browse latest Browse all 542

How to make Qt5 QWebView transparent

$
0
0
We used to use trick http://blog.qt.digia.com/blog/2009/06/30/transparent-qwebview-or-qwebpage/ to make QWebView transparent with Qt4 as following, but same code give us blank background with Qt 5.2. Is there any way I can make that work with Qt5? setAttribute(Qt::WA_TranslucentBackground, true); setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);   if(m_pWebView) {     QPalette palette = m_pWebView->palette();     palette.setBrush(QPalette::Base, Qt::transparent);     m_pWebView->page()->setPalette(palette);     m_pWebView->setAttribute(Qt::WA_OpaquePaintEvent, false);     m_pWebView->setContextMenuPolicy(Qt::NoContextMenu); }

Viewing all articles
Browse latest Browse all 542

Trending Articles