1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGraphicsWebView Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsWebView Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QGraphicsWebView class allows Web content to be added to a
<a href="graphicsview.html#graphicsview">GraphicsView</a>. <a href="#details">More...</a></p>
<p>Inherits <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicswebview.html#QGraphicsWebView">__init__</a></b> (<i>self</i>, QGraphicsItem <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#back">back</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QGraphicsSceneContextMenuEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#dropEvent">dropEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#findText">findText</a></b> (<i>self</i>, QString <i>subString</i>, QWebPage.FindFlags <i>options</i> = 0)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool <i>next</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#forward">forward</a></b> (<i>self</i>)</li><li><div class="fn" />QWebHistory <b><a href="qgraphicswebview.html#history">history</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#hoverLeaveEvent">hoverLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#hoverMoveEvent">hoverMoveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent)</li><li><div class="fn" />QIcon <b><a href="qgraphicswebview.html#icon">icon</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#inputMethodEvent">inputMethodEvent</a></b> (<i>self</i>, QInputMethodEvent)</li><li><div class="fn" />QVariant <b><a href="qgraphicswebview.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery <i>query</i>)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#isModified">isModified</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#isTiledBackingStoreFrozen">isTiledBackingStoreFrozen</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qgraphicswebview.html#itemChange">itemChange</a></b> (<i>self</i>, QGraphicsItem.GraphicsItemChange <i>change</i>, QVariant <i>value</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#load">load</a></b> (<i>self</i>, QUrl <i>url</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#load-2">load</a></b> (<i>self</i>, QNetworkRequest <i>request</i>, QNetworkAccessManager.Operation <i>operation</i> = QNetworkAccessManager.GetOperation, QByteArray <i>body</i> = QByteArray())</li><li><div class="fn" /><b><a href="qgraphicswebview.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" />QWebPage <b><a href="qgraphicswebview.html#page">page</a></b> (<i>self</i>)</li><li><div class="fn" />QAction <b><a href="qgraphicswebview.html#pageAction">pageAction</a></b> (<i>self</i>, QWebPage.WebAction <i>action</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#paint">paint</a></b> (<i>self</i>, QPainter <i>painter</i>, QStyleOptionGraphicsItem <i>option</i>, QWidget <i>widget</i> = None)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#reload">reload</a></b> (<i>self</i>)</li><li><div class="fn" />QPainter.RenderHints <b><a href="qgraphicswebview.html#renderHints">renderHints</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#resizesToContents">resizesToContents</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicswebview.html#sceneEvent">sceneEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setContent">setContent</a></b> (<i>self</i>, QByteArray <i>data</i>, QString <i>mimeType</i> = QString(), QUrl <i>baseUrl</i> = QUrl())</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRectF <i>rect</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setHtml">setHtml</a></b> (<i>self</i>, QString <i>html</i>, QUrl <i>baseUrl</i> = QUrl())</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setPage">setPage</a></b> (<i>self</i>, QWebPage)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setRenderHint">setRenderHint</a></b> (<i>self</i>, QPainter.RenderHint <i>hint</i>, bool <i>enabled</i> = True)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setRenderHints">setRenderHints</a></b> (<i>self</i>, QPainter.RenderHints <i>hints</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setResizesToContents">setResizesToContents</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setTiledBackingStoreFrozen">setTiledBackingStoreFrozen</a></b> (<i>self</i>, bool <i>frozen</i>)</li><li><div class="fn" />QWebSettings <b><a href="qgraphicswebview.html#settings">settings</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setUrl">setUrl</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#setZoomFactor">setZoomFactor</a></b> (<i>self</i>, float)</li><li><div class="fn" />QSizeF <b><a href="qgraphicswebview.html#sizeHint">sizeHint</a></b> (<i>self</i>, Qt.SizeHint <i>which</i>, QSizeF <i>constraint</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#stop">stop</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qgraphicswebview.html#title">title</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#triggerPageAction">triggerPageAction</a></b> (<i>self</i>, QWebPage.WebAction <i>action</i>, bool <i>checked</i> = False)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#updateGeometry">updateGeometry</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qgraphicswebview.html#url">url</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicswebview.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QGraphicsSceneWheelEvent)</li><li><div class="fn" />float <b><a href="qgraphicswebview.html#zoomFactor">zoomFactor</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qgraphicswebview.html#iconChanged">iconChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#linkClicked">linkClicked</a></b> (const QUrl&)</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#loadFinished">loadFinished</a></b> (bool)</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#loadProgress">loadProgress</a></b> (int)</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#loadStarted">loadStarted</a></b> ()</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#statusBarMessage">statusBarMessage</a></b> (const QString&)</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#titleChanged">titleChanged</a></b> (const QString&)</li><li><div class="fn" />void <b><a href="qgraphicswebview.html#urlChanged">urlChanged</a></b> (const QUrl&)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsWebView class allows Web content to be added to a
<a href="graphicsview.html#graphicsview">GraphicsView</a>.</p>
<p>An instance of this class renders Web content from a URL or
supplied as data, using features of the <a href="qtwebkit.html">QtWebKit</a> module.</p>
<p>If the width and height of the item are not set, they will
default to 800 and 600, respectively. If the Web page contents is
larger than that, scrollbars will be shown if not disabled
explicitly.</p>
<a id="browser-features" name="browser-features" />
<h3>Browser Features</h3>
<p>Many of the functions, signals and properties provided by
<a href="qwebview.html">QWebView</a> are also available for this
item, making it simple to adapt existing code to use
QGraphicsWebView instead of <a href="qwebview.html">QWebView</a>.</p>
<p>The item uses a <a href="qwebpage.html">QWebPage</a> object to
perform the rendering of Web content, and this can be obtained with
the <a href="qgraphicswebview.html#page">page</a>() function,
enabling the document itself to be accessed and modified.</p>
<p>As with <a href="qwebview.html">QWebView</a>, the item records
the browsing history using a <a href="qwebhistory.html">QWebHistory</a> object, accessible using the
<a href="qgraphicswebview.html#history">history</a>() function. The
<a href="qwebsettings.html">QWebSettings</a> object that defines
the configuration of the browser can be obtained with the <a href="qgraphicswebview.html#settings">settings</a>() function, enabling
features like plugin support to be customized for each item.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsWebView" />QGraphicsWebView.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty <a href="qgraphicswebview.html">QGraphicsWebView</a> with parent
<i>parent</i>.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#load">load</a>().</p>
<h3 class="fn"><a name="back" />QGraphicsWebView.back (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void back()</tt>.</p><p>Convenience slot that loads the previous document in the list of
documents built by navigating links. Does nothing if there is no
previous document.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#forward">forward</a>().</p>
<h3 class="fn"><a name="contextMenuEvent" />QGraphicsWebView.contextMenuEvent (<i>self</i>, <a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#contextMenuEvent">QGraphicsItem.contextMenuEvent</a>().</p>
<h3 class="fn"><a name="dragEnterEvent" />QGraphicsWebView.dragEnterEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragEnterEvent">QGraphicsItem.dragEnterEvent</a>().</p>
<h3 class="fn"><a name="dragLeaveEvent" />QGraphicsWebView.dragLeaveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragLeaveEvent">QGraphicsItem.dragLeaveEvent</a>().</p>
<h3 class="fn"><a name="dragMoveEvent" />QGraphicsWebView.dragMoveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragMoveEvent">QGraphicsItem.dragMoveEvent</a>().</p>
<h3 class="fn"><a name="dropEvent" />QGraphicsWebView.dropEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dropEvent">QGraphicsItem.dropEvent</a>().</p>
<h3 class="fn"><a name="event" />bool QGraphicsWebView.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<h3 class="fn"><a name="findText" />bool QGraphicsWebView.findText (<i>self</i>, QString <i>subString</i>, <a href="qwebpage-findflags.html">QWebPage.FindFlags</a> <i>options</i> = 0)</h3><p>Finds the specified string, <i>subString</i>, in the page, using
the given <i>options</i>.</p>
<p>If the HighlightAllOccurrences flag is passed, the function will
highlight all occurrences that exist in the page. All subsequent
calls will extend the highlight, rather than replace it, with
occurrences of the new string.</p>
<p>If the HighlightAllOccurrences flag is not passed, the function
will select an occurrence and all subsequent calls will replace the
current occurrence with the next one.</p>
<p>To clear the selection, just pass an empty string.</p>
<p>Returns true if <i>subString</i> was found; otherwise returns
false.</p>
<p><b>See also</b> <a href="qwebpage.html#selectedText-prop">QWebPage.selectedText</a>() and
<a href="qwebpage.html#selectionChanged">QWebPage.selectionChanged</a>().</p>
<h3 class="fn"><a name="focusInEvent" />QGraphicsWebView.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusInEvent">QGraphicsItem.focusInEvent</a>().</p>
<h3 class="fn"><a name="focusNextPrevChild" />bool QGraphicsWebView.focusNextPrevChild (<i>self</i>, bool <i>next</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#focusNextPrevChild">QGraphicsWidget.focusNextPrevChild</a>().</p>
<h3 class="fn"><a name="focusOutEvent" />QGraphicsWebView.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusOutEvent">QGraphicsItem.focusOutEvent</a>().</p>
<h3 class="fn"><a name="forward" />QGraphicsWebView.forward (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void forward()</tt>.</p><p>Convenience slot that loads the next document in the list of
documents built by navigating links. Does nothing if there is no
next document.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#back">back</a>().</p>
<h3 class="fn"><a name="history" /><a href="qwebhistory.html">QWebHistory</a> QGraphicsWebView.history (<i>self</i>)</h3><p>Returns a pointer to the view's history of navigated web
pages.</p>
<p>It is equivalent to</p>
<pre class="cpp">
view<span class="operator">-</span><span class="operator">></span>page()<span class="operator">-</span><span class="operator">></span>history();
</pre>
<h3 class="fn"><a name="hoverLeaveEvent" />QGraphicsWebView.hoverLeaveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverLeaveEvent">QGraphicsItem.hoverLeaveEvent</a>().</p>
<h3 class="fn"><a name="hoverMoveEvent" />QGraphicsWebView.hoverMoveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverMoveEvent">QGraphicsItem.hoverMoveEvent</a>().</p>
<h3 class="fn"><a name="icon" /><a href="qicon.html">QIcon</a> QGraphicsWebView.icon (<i>self</i>)</h3><h3 class="fn"><a name="inputMethodEvent" />QGraphicsWebView.inputMethodEvent (<i>self</i>, <a href="qinputmethodevent.html">QInputMethodEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#inputMethodEvent">QGraphicsItem.inputMethodEvent</a>().</p>
<h3 class="fn"><a name="inputMethodQuery" />QVariant QGraphicsWebView.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a> <i>query</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#inputMethodQuery">QGraphicsItem.inputMethodQuery</a>().</p>
<h3 class="fn"><a name="isModified" />bool QGraphicsWebView.isModified (<i>self</i>)</h3><h3 class="fn"><a name="isTiledBackingStoreFrozen" />bool QGraphicsWebView.isTiledBackingStoreFrozen (<i>self</i>)</h3><h3 class="fn"><a name="itemChange" />QVariant QGraphicsWebView.itemChange (<i>self</i>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">QGraphicsItem.GraphicsItemChange</a> <i>change</i>, QVariant <i>value</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#itemChange">QGraphicsItem.itemChange</a>().</p>
<h3 class="fn"><a name="keyPressEvent" />QGraphicsWebView.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyPressEvent">QGraphicsItem.keyPressEvent</a>().</p>
<h3 class="fn"><a name="keyReleaseEvent" />QGraphicsWebView.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyReleaseEvent">QGraphicsItem.keyReleaseEvent</a>().</p>
<h3 class="fn"><a name="load" />QGraphicsWebView.load (<i>self</i>, <a href="qurl.html">QUrl</a> <i>url</i>)</h3><p>Loads the specified <i>url</i> and displays it.</p>
<p><b>Note:</b> The view remains the same until enough data has
arrived to display the new <i>url</i>.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#url-prop">setUrl</a>(), <a href="qgraphicswebview.html#url-prop">url</a>(), and <a href="qgraphicswebview.html#urlChanged">urlChanged</a>().</p>
<h3 class="fn"><a name="load-2" />QGraphicsWebView.load (<i>self</i>, <a href="qnetworkrequest.html">QNetworkRequest</a> <i>request</i>, <a href="qnetworkaccessmanager.html#Operation-enum">QNetworkAccessManager.Operation</a> <i>operation</i> = QNetworkAccessManager.GetOperation, <a href="qbytearray.html">QByteArray</a> <i>body</i> = QByteArray())</h3><p>Loads a network request, <i>request</i>, using the method
specified in <i>operation</i>.</p>
<p><i>body</i> is optional and is only used for POST
operations.</p>
<p><b>Note:</b> The view remains the same until enough data has
arrived to display the new url.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#url-prop">url</a>() and <a href="qgraphicswebview.html#urlChanged">urlChanged</a>().</p>
<h3 class="fn"><a name="mouseDoubleClickEvent" />QGraphicsWebView.mouseDoubleClickEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseDoubleClickEvent">QGraphicsItem.mouseDoubleClickEvent</a>().</p>
<h3 class="fn"><a name="mouseMoveEvent" />QGraphicsWebView.mouseMoveEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseMoveEvent">QGraphicsItem.mouseMoveEvent</a>().</p>
<h3 class="fn"><a name="mousePressEvent" />QGraphicsWebView.mousePressEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mousePressEvent">QGraphicsItem.mousePressEvent</a>().</p>
<h3 class="fn"><a name="mouseReleaseEvent" />QGraphicsWebView.mouseReleaseEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseReleaseEvent">QGraphicsItem.mouseReleaseEvent</a>().</p>
<h3 class="fn"><a name="page" /><a href="qwebpage.html">QWebPage</a> QGraphicsWebView.page (<i>self</i>)</h3><p>Returns a pointer to the underlying web page.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#setPage">setPage</a>().</p>
<h3 class="fn"><a name="pageAction" /><a href="qaction.html">QAction</a> QGraphicsWebView.pageAction (<i>self</i>, <a href="qwebpage.html#WebAction-enum">QWebPage.WebAction</a> <i>action</i>)</h3><p>Returns a pointer to a <a href="qaction.html">QAction</a> that
encapsulates the specified web action <i>action</i>.</p>
<h3 class="fn"><a name="paint" />QGraphicsWebView.paint (<i>self</i>, <a href="qpainter.html">QPainter</a> <i>painter</i>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a> <i>option</i>, <a href="qwidget.html">QWidget</a> <i>widget</i> = None)</h3><p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem.paint</a>().</p>
<h3 class="fn"><a name="reload" />QGraphicsWebView.reload (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void reload()</tt>.</p><p>Reloads the current document.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#stop">stop</a>()
and <a href="qgraphicswebview.html#loadStarted">loadStarted</a>().</p>
<h3 class="fn"><a name="renderHints" /><a href="qpainter-renderhints.html">QPainter.RenderHints</a> QGraphicsWebView.renderHints (<i>self</i>)</h3><h3 class="fn"><a name="resizesToContents" />bool QGraphicsWebView.resizesToContents (<i>self</i>)</h3><h3 class="fn"><a name="sceneEvent" />bool QGraphicsWebView.sceneEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#sceneEvent">QGraphicsItem.sceneEvent</a>().</p>
<h3 class="fn"><a name="setContent" />QGraphicsWebView.setContent (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>data</i>, QString <i>mimeType</i> = QString(), <a href="qurl.html">QUrl</a> <i>baseUrl</i> = QUrl())</h3><p>Sets the content of the web graphicsitem to the specified
content <i>data</i>. If the <i>mimeType</i> argument is empty it is
currently assumed that the content is HTML but in future versions
we may introduce auto-detection.</p>
<p>External objects referenced in the content are located relative
to <i>baseUrl</i>.</p>
<p>The <i>data</i> is loaded immediately; external objects are
loaded asynchronously.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#load">load</a>(),
<a href="qgraphicswebview.html#setHtml">setHtml</a>(), and <a href="qwebframe.html#toHtml">QWebFrame.toHtml</a>().</p>
<h3 class="fn"><a name="setGeometry" />QGraphicsWebView.setGeometry (<i>self</i>, <a href="qrectf.html">QRectF</a> <i>rect</i>)</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem.setGeometry</a>().</p>
<h3 class="fn"><a name="setHtml" />QGraphicsWebView.setHtml (<i>self</i>, QString <i>html</i>, <a href="qurl.html">QUrl</a> <i>baseUrl</i> = QUrl())</h3><p>Sets the content of the web view to the specified
<i>html</i>.</p>
<p>External objects such as stylesheets or images referenced in the
HTML document are located relative to <i>baseUrl</i>.</p>
<p>The <i>html</i> is loaded immediately; external objects are
loaded asynchronously.</p>
<p>When using this method, WebKit assumes that external resources
such as JavaScript programs or style sheets are encoded in UTF-8
unless otherwise specified. For example, the encoding of an
external script can be specified through the charset attribute of
the HTML script tag. Alternatively, the encoding can also be
specified by the web server.</p>
<p>This is a convenience function equivalent to setContent(html,
"text/html", baseUrl).</p>
<p><b>Warning:</b> This function works only for HTML, for other
mime types (i.e. XHTML, SVG) <a href="qgraphicswebview.html#setContent">setContent</a>() should be used
instead.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#load">load</a>(),
<a href="qgraphicswebview.html#setContent">setContent</a>(),
<a href="qwebframe.html#toHtml">QWebFrame.toHtml</a>(), and
<a href="qwebframe.html#setContent">QWebFrame.setContent</a>().</p>
<h3 class="fn"><a name="setPage" />QGraphicsWebView.setPage (<i>self</i>, <a href="qwebpage.html">QWebPage</a>)</h3><p>Makes <i>page</i> the new web page of the web graphicsitem.</p>
<p>The parent <a href="qobject.html">QObject</a> of the provided
page remains the owner of the object. If the current document is a
child of the web view, it will be deleted.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#page">page</a>().</p>
<h3 class="fn"><a name="setRenderHint" />QGraphicsWebView.setRenderHint (<i>self</i>, <a href="qpainter.html#RenderHint-enum">QPainter.RenderHint</a> <i>hint</i>, bool <i>enabled</i> = True)</h3><p>If <i>enabled</i> is true, enables the specified render
<i>hint</i>; otherwise disables it.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#renderHints-prop">renderHints</a> and
<a href="qpainter.html#renderHints">QPainter.renderHints</a>().</p>
<h3 class="fn"><a name="setRenderHints" />QGraphicsWebView.setRenderHints (<i>self</i>, <a href="qpainter-renderhints.html">QPainter.RenderHints</a> <i>hints</i>)</h3><h3 class="fn"><a name="setResizesToContents" />QGraphicsWebView.setResizesToContents (<i>self</i>, bool <i>enabled</i>)</h3><h3 class="fn"><a name="setTiledBackingStoreFrozen" />QGraphicsWebView.setTiledBackingStoreFrozen (<i>self</i>, bool <i>frozen</i>)</h3><h3 class="fn"><a name="settings" /><a href="qwebsettings.html">QWebSettings</a> QGraphicsWebView.settings (<i>self</i>)</h3><p>Returns a pointer to the view/page specific settings object.</p>
<p>It is equivalent to</p>
<pre class="cpp">
view<span class="operator">-</span><span class="operator">></span>page()<span class="operator">-</span><span class="operator">></span>settings();
</pre>
<p><b>See also</b> <a href="qwebsettings.html#globalSettings">QWebSettings.globalSettings</a>().</p>
<h3 class="fn"><a name="setUrl" />QGraphicsWebView.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="setZoomFactor" />QGraphicsWebView.setZoomFactor (<i>self</i>, float)</h3><h3 class="fn"><a name="sizeHint" /><a href="qsizef.html">QSizeF</a> QGraphicsWebView.sizeHint (<i>self</i>, <a href="qt.html#SizeHint-enum">Qt.SizeHint</a> <i>which</i>, <a href="qsizef.html">QSizeF</a> <i>constraint</i>)</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem.sizeHint</a>().</p>
<h3 class="fn"><a name="stop" />QGraphicsWebView.stop (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stop()</tt>.</p><p>Convenience slot that stops loading the document.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#reload">reload</a>() and <a href="qgraphicswebview.html#loadFinished">loadFinished</a>().</p>
<h3 class="fn"><a name="title" />QString QGraphicsWebView.title (<i>self</i>)</h3><h3 class="fn"><a name="triggerPageAction" />QGraphicsWebView.triggerPageAction (<i>self</i>, <a href="qwebpage.html#WebAction-enum">QWebPage.WebAction</a> <i>action</i>, bool <i>checked</i> = False)</h3><p>Triggers the specified <i>action</i>. If it is a checkable
action the specified <i>checked</i> state is assumed.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#pageAction">pageAction</a>().</p>
<h3 class="fn"><a name="updateGeometry" />QGraphicsWebView.updateGeometry (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#updateGeometry">QGraphicsLayoutItem.updateGeometry</a>().</p>
<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QGraphicsWebView.url (<i>self</i>)</h3><h3 class="fn"><a name="wheelEvent" />QGraphicsWebView.wheelEvent (<i>self</i>, <a href="qgraphicsscenewheelevent.html">QGraphicsSceneWheelEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#wheelEvent">QGraphicsItem.wheelEvent</a>().</p>
<h3 class="fn"><a name="zoomFactor" />float QGraphicsWebView.zoomFactor (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="iconChanged" />void iconChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the icon of the page is loaded
or changes.</p>
<p>In order for icons to be loaded, you will need to set an icon
database path using <a href="qwebsettings.html#setIconDatabasePath">QWebSettings.setIconDatabasePath</a>().</p>
<p><b>See also</b> <a href="qgraphicswebview.html#icon-prop">icon</a>() and <a href="qwebsettings.html#setIconDatabasePath">QWebSettings.setIconDatabasePath</a>().</p>
<h3 class="fn"><a name="linkClicked" />void linkClicked (const QUrl&)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the user clicks on a link and
the page's linkDelegationPolicy property is set to delegate the
link handling for the specified <i>url</i>.</p>
<p><b>See also</b> <a href="qwebpage.html#linkDelegationPolicy-prop">QWebPage.linkDelegationPolicy</a>().</p>
<h3 class="fn"><a name="loadFinished" />void loadFinished (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when a load of the page is finished.
<i>ok</i> will indicate whether the load was successful or any
error occurred.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#loadStarted">loadStarted</a>().</p>
<h3 class="fn"><a name="loadProgress" />void loadProgress (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted every time an element in the web page
completes loading and the overall loading progress advances.</p>
<p>This signal tracks the progress of all child frames.</p>
<p>The current value is provided by <i>progress</i> and scales from
0 to 100, which is the default range of <a href="qprogressbar.html">QProgressBar</a>.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#loadStarted">loadStarted</a>() and <a href="qgraphicswebview.html#loadFinished">loadFinished</a>().</p>
<h3 class="fn"><a name="loadStarted" />void loadStarted ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when a new load of the page is
started.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#loadProgress">loadProgress</a>() and
<a href="qgraphicswebview.html#loadFinished">loadFinished</a>().</p>
<h3 class="fn"><a name="statusBarMessage" />void statusBarMessage (const QString&)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the statusbar <i>text</i> is changed
by the page.</p>
<h3 class="fn"><a name="titleChanged" />void titleChanged (const QString&)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the <i>title</i> of the main
frame changes.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#title-prop">title</a>().</p>
<h3 class="fn"><a name="urlChanged" />void urlChanged (const QUrl&)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the <i>url</i> of the view
changes.</p>
<p><b>See also</b> <a href="qgraphicswebview.html#url-prop">url</a>() and <a href="qgraphicswebview.html#load">load</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.9.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.2</td></tr></table></div></address></body></html>
|