[webkit-qt] QGraphicsWebView transparency

Simon Hausmann simon.hausmann at nokia.com
Wed Aug 4 01:32:10 PDT 2010


Hi,

Jason just noticed the following snippet of code in QGraphicsWebView, that 
appears to make it transparent by default:

QWebPage* QGraphicsWebView::page() const
{
    if (!d->page) {
        QGraphicsWebView* that = const_cast<QGraphicsWebView*>(this);
        QWebPage* page = new QWebPage(that);

        // Default to not having a background, in the case
        // the page doesn't provide one.
        QPalette palette = QApplication::palette();
        palette.setBrush(QPalette::Base, QColor::fromRgbF(0, 0, 0, 0));
        page->setPalette(palette);

        that->setPage(page);
    }

    return d->page;
}

Does anyone have any thoughts or objections against removing the default 
transparent'ness of QGraphicsWebView?

It appears inconsistent with QWebView and I would think that web content is 
primarily designed for opaque backgrounds.


Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20100804/9f7a0ca3/attachment.bin>


More information about the webkit-qt mailing list