/*! Returns a pointer to the underlying web page. \sa setPage() */ 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; }
void tst_QGraphicsWebView::qgraphicswebview() { QGraphicsWebView item; item.url(); item.title(); item.icon(); item.zoomFactor(); item.history(); item.settings(); item.page(); item.setPage(0); item.page(); item.setUrl(QUrl()); item.setZoomFactor(0); item.load(QUrl()); item.setHtml(QString()); item.setContent(QByteArray()); item.isModified(); }
void QGraphicsWebViewPrivate::_q_pageDestroyed() { page = 0; q->setPage(0); }