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(); }
// ! [0] int main(int argc, char **argv) { QApplication app(argc, argv); const int width = 640; const int height = 480; QGraphicsScene scene; QGraphicsView view(&scene); view.setFrameShape(QFrame::NoFrame); view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QGraphicsWebView webview; webview.resize(width, height); webview.load(QUrl("http://doc.qt.nokia.com/")); scene.addItem(&webview); view.resize(width, height); view.show(); return app.exec(); }
int main(int argc, char **argv) { QApplication app(argc, argv); const int width = 1024; const int height = 768; QGraphicsScene scene; QGraphicsView view(&scene); view.setWindowTitle("Game"); view.setFrameShape(QFrame::NoFrame); view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QGraphicsWebView webview; webview.resize(width, height); webview.load(QUrl("index.html")); scene.addItem(&webview); view.resize(width, height); view.show(); return app.exec(); }