/usr/share/qt5/doc/qtwebkit/qwebframe.html is in qtwebkit5-doc-html 5.212.0~alpha2-7ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwebframe.cpp -->
<title>QWebFrame Class | Qt 5.212.0</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td >Qt 5.212.0</td><td >QWebFrame</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.212.0 Reference Documentation</td>
</tr></table>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QWebFrame Class</h1>
<!-- $$$QWebFrame-brief -->
<p>The <a href="qwebframe.html">QWebFrame</a> class represents a frame in a web page. <a href="#details">More...</a></p>
<!-- @@@QWebFrame -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QWebFrame></span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += webkitwidgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 4.4</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qwebframe-members.html">List of all members, including inherited members</a></li>
<li><a href="qwebframe-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#RenderLayer-enum">RenderLayer</a></b> { ContentsLayer, ScrollBarLayer, PanIconLayer, AllLayers }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#RenderLayer-enum">RenderLayers</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#ValueOwnership-enum">ValueOwnership</a></b> { QtOwnership, ScriptOwnership, AutoOwnership }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qwebframe.html#baseUrl-prop">baseUrl</a></b> : const QUrl</li>
<li class="fn"><b><a href="qwebframe.html#contentsSize-prop">contentsSize</a></b> : const QSize</li>
<li class="fn"><b><a href="qwebframe.html#focus-prop">focus</a></b> : const bool</li>
<li class="fn"><b><a href="qwebframe.html#icon-prop">icon</a></b> : const QIcon</li>
<li class="fn"><b><a href="qwebframe.html#requestedUrl-prop">requestedUrl</a></b> : const QUrl</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qwebframe.html#scrollPosition-prop">scrollPosition</a></b> : QPoint</li>
<li class="fn"><b><a href="qwebframe.html#title-prop">title</a></b> : const QString</li>
<li class="fn"><b><a href="qwebframe.html#url-prop">url</a></b> : QUrl</li>
<li class="fn"><b><a href="qwebframe.html#zoomFactor-prop">zoomFactor</a></b> : qreal</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a></b>(const QString &<i>name</i>, QObject *<i>object</i>, ValueOwnership <i>own</i> = QtOwnership)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#baseUrl-prop">baseUrl</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QWebFrame *> </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#childFrames">childFrames</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#contentsSize-prop">contentsSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebElement </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#documentElement">documentElement</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebElementCollection </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#findAllElements">findAllElements</a></b>(const QString &<i>selectorQuery</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebElement </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#findFirstElement">findFirstElement</a></b>(const QString &<i>selectorQuery</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#frameName">frameName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#geometry">geometry</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#focus-prop">hasFocus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebHitTestResult </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#hitTestContent">hitTestContent</a></b>(const QPoint &<i>pos</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#icon-prop">icon</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#load">load</a></b>(const QUrl &<i>url</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#load-1">load</a></b>(const QNetworkRequest &<i>req</i>, QNetworkAccessManager::Operation <i>operation</i> = QNetworkAccessManager::GetOperation, const QByteArray &<i>body</i> = QByteArray())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMultiMap<QString, QString> </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#metaData">metaData</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebElement </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#ownerElement">ownerElement</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebPage *</td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#page">page</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebFrame *</td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#parentFrame">parentFrame</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#pos">pos</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#render">render</a></b>(QPainter *<i>painter</i>, const QRegion &<i>clip</i> = QRegion())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#render-1">render</a></b>(QPainter *<i>painter</i>, RenderLayers <i>layer</i>, const QRegion &<i>clip</i> = QRegion())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#requestedUrl-prop">requestedUrl</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scroll">scroll</a></b>(int <i>dx</i>, int <i>dy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollBarGeometry">scrollBarGeometry</a></b>(Qt::Orientation <i>orientation</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a></b>(Qt::Orientation <i>orientation</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a></b>(Qt::Orientation <i>orientation</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::ScrollBarPolicy </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollBarPolicy">scrollBarPolicy</a></b>(Qt::Orientation <i>orientation</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollBarValue">scrollBarValue</a></b>(Qt::Orientation <i>orientation</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollPosition-prop">scrollPosition</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollToAnchor">scrollToAnchor</a></b>(const QString &<i>anchor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebSecurityOrigin </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#securityOrigin">securityOrigin</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setContent">setContent</a></b>(const QByteArray &<i>data</i>, const QString &<i>mimeType</i> = QString(), const QUrl &<i>baseUrl</i> = QUrl())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setFocus">setFocus</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setHtml">setHtml</a></b>(const QString &<i>html</i>, const QUrl &<i>baseUrl</i> = QUrl())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setScrollBarPolicy">setScrollBarPolicy</a></b>(Qt::Orientation <i>orientation</i>, Qt::ScrollBarPolicy <i>policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setScrollBarValue">setScrollBarValue</a></b>(Qt::Orientation <i>orientation</i>, int <i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#scrollPosition-prop">setScrollPosition</a></b>(const QPoint &<i>pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#setTextSizeMultiplier">setTextSizeMultiplier</a></b>(qreal <i>factor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#url-prop">setUrl</a></b>(const QUrl &<i>url</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#zoomFactor-prop">setZoomFactor</a></b>(qreal <i>factor</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#textSizeMultiplier">textSizeMultiplier</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#title-prop">title</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#toHtml">toHtml</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#toPlainText">toPlainText</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#url-prop">url</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#zoomFactor-prop">zoomFactor</a></b>() const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#event">event</a></b>(QEvent *<i>e</i>)</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#evaluateJavaScript">evaluateJavaScript</a></b>(const QString &<i>scriptSource</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#print">print</a></b>(QPrinter *<i>printer</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#contentsSizeChanged">contentsSizeChanged</a></b>(const QSize &<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#iconChanged">iconChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#initialLayoutCompleted">initialLayoutCompleted</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#loadFinished">loadFinished</a></b>(bool <i>ok</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#loadStarted">loadStarted</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#pageChanged">pageChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#titleChanged">titleChanged</a></b>(const QString &<i>title</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebframe.html#urlChanged">urlChanged</a></b>(const QUrl &<i>url</i>)</td></tr>
</table></div>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QWebFrame-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qwebframe.html">QWebFrame</a> class represents a frame in a web page.</p>
<p><a href="qwebframe.html">QWebFrame</a> represents a frame inside a web page. Each <a href="qwebpage.html">QWebPage</a> object contains at least one frame, the main frame, obtained using <a href="qwebpage.html#mainFrame">QWebPage::mainFrame</a>(). Additional frames will be created for HTML <code><frame></code> or <code><iframe></code> elements.</p>
<p>A frame can be loaded using <a href="qwebframe.html#load">load</a>() or <a href="qwebframe.html#url-prop">setUrl</a>(). Alternatively, if you have the HTML content readily available, you can use <a href="qwebframe.html#setHtml">setHtml</a>() instead.</p>
<p>The <a href="qwebframe.html#page">page</a>() function returns a pointer to the web page object. See <a href="qwebview.html">Elements of QWebView</a> for an explanation of how web frames are related to a web page and web view.</p>
<p>The <a href="qwebframe.html">QWebFrame</a> class also offers methods to retrieve both the URL currently loaded by the frame (see <a href="qwebframe.html#url-prop">url</a>()) as well as the URL originally requested to be loaded (see <a href="qwebframe.html#requestedUrl-prop">requestedUrl</a>()). These methods make possible the retrieval of the URL before and after a DNS resolution or a redirection occurs during the load process. The <a href="qwebframe.html#requestedUrl-prop">requestedUrl</a>() also matches to the URL added to the frame history (<a href="qwebhistory.html">QWebHistory</a>) if load is successful.</p>
<p>The title of an HTML frame can be accessed with the <a href="qwebframe.html#title-prop">title</a>() property. Additionally, a frame may also specify an icon, which can be accessed using the <a href="qwebframe.html#icon-prop">icon</a>() property. If the title or the icon changes, the corresponding <a href="qwebframe.html#titleChanged">titleChanged</a>() and <a href="qwebframe.html#iconChanged">iconChanged</a>() signals will be emitted. The <a href="qwebframe.html#zoomFactor-prop">zoomFactor</a>() property can be used to change the overall size of the content displayed in the frame.</p>
<p><a href="qwebframe.html">QWebFrame</a> objects are created and controlled by the web page. You can connect to the web page's <a href="qwebpage.html#frameCreated">frameCreated()</a> signal to be notified when a new frame is created.</p>
<p>There are multiple ways to programmatically examine the contents of a frame. The <a href="qwebframe.html#hitTestContent">hitTestContent</a>() function can be used to find elements by coordinate. For access to the underlying DOM tree, there is <a href="qwebframe.html#documentElement">documentElement</a>(), <a href="qwebframe.html#findAllElements">findAllElements</a>() and <a href="qwebframe.html#findFirstElement">findFirstElement</a>().</p>
<p>A <a href="qwebframe.html">QWebFrame</a> can be printed onto a <a href="../qtprintsupport/qprinter.html">QPrinter</a> using the <a href="qwebframe.html#print">print</a>() function. This function is marked as a slot and can be conveniently connected to <a href="../qtprintsupport/qprintpreviewdialog.html">QPrintPreviewDialog</a>'s <a href="../qtprintsupport/qprintpreviewdialog.html#paintRequested">paintRequested()</a> signal.</p>
</div>
<p><b>See also </b><a href="qwebpage.html">QWebPage</a>.</p>
<!-- @@@QWebFrame -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$RenderLayer$$$ContentsLayer$$$ScrollBarLayer$$$PanIconLayer$$$AllLayers -->
<h3 class="flags" id="RenderLayer-enum"><a name="RenderLayer-enum"></a>enum QWebFrame::<span class="name">RenderLayer</span><br/>flags QWebFrame::<span class="name">RenderLayers</span></h3>
<p>This enum describes the layers available for rendering using <a href="qwebframe.html#render">render()</a>. The layers can be OR-ed together from the following list:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWebFrame::ContentsLayer</code></td><td class="topAlign tblval"><code>0x10</code></td><td class="topAlign">The web content of the frame</td></tr>
<tr><td class="topAlign"><code>QWebFrame::ScrollBarLayer</code></td><td class="topAlign tblval"><code>0x20</code></td><td class="topAlign">The scrollbars of the frame</td></tr>
<tr><td class="topAlign"><code>QWebFrame::PanIconLayer</code></td><td class="topAlign tblval"><code>0x40</code></td><td class="topAlign">The icon used when panning the frame</td></tr>
<tr><td class="topAlign"><code>QWebFrame::AllLayers</code></td><td class="topAlign tblval"><code>0xff</code></td><td class="topAlign">Includes all the above layers</td></tr>
</table></div>
<p>The RenderLayers type is a typedef for <a href="../qtcore/qflags.html">QFlags</a><RenderLayer>. It stores an OR combination of RenderLayer values.</p>
<!-- @@@RenderLayer -->
<!-- $$$ValueOwnership$$$QtOwnership$$$ScriptOwnership$$$AutoOwnership -->
<h3 class="fn" id="ValueOwnership-enum"><a name="ValueOwnership-enum"></a>enum QWebFrame::<span class="name">ValueOwnership</span></h3>
<!-- @@@ValueOwnership -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$baseUrl-prop$$$baseUrl -->
<h3 class="fn" id="baseUrl-prop"><a name="baseUrl-prop"></a><span class="name">baseUrl</span> : const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span></h3>
<p>This property holds the base URL of the frame, can be used to resolve relative URLs</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QUrl </td><td class="memItemRight bottomAlign"><span class="name"><b>baseUrl</b></span>() const</td></tr>
</table></div>
<!-- @@@baseUrl -->
<!-- $$$contentsSize-prop$$$contentsSize -->
<h3 class="fn" id="contentsSize-prop"><a name="contentsSize-prop"></a><span class="name">contentsSize</span> : const <span class="type"><a href="../qtcore/qsize.html">QSize</a></span></h3>
<p>This property holds the size of the contents in this frame</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>contentsSize</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qwebframe.html#contentsSizeChanged">contentsSizeChanged</a>().</p>
<!-- @@@contentsSize -->
<!-- $$$focus-prop$$$hasFocus -->
<h3 class="fn" id="focus-prop"><a name="focus-prop"></a><span class="name">focus</span> : const <span class="type">bool</span></h3>
<p>Returns true if this frame has keyboard input focus; otherwise, returns false.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasFocus</b></span>() const</td></tr>
</table></div>
<!-- @@@focus -->
<!-- $$$icon-prop$$$icon -->
<h3 class="fn" id="icon-prop"><a name="icon-prop"></a><span class="name">icon</span> : const <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span></h3>
<p>This property holds the icon associated with this frame</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QIcon </td><td class="memItemRight bottomAlign"><span class="name"><b>icon</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qwebframe.html#iconChanged">iconChanged</a>() and <a href="qwebsettings.html#iconForUrl">QWebSettings::iconForUrl</a>().</p>
<!-- @@@icon -->
<!-- $$$requestedUrl-prop$$$requestedUrl -->
<h3 class="fn" id="requestedUrl-prop"><a name="requestedUrl-prop"></a><span class="name">requestedUrl</span> : const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span></h3>
<p>The URL requested to loaded by the frame currently viewed. The URL may differ from the one returned by <a href="qwebframe.html#url-prop">url</a>() if a DNS resolution or a redirection occurs.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QUrl </td><td class="memItemRight bottomAlign"><span class="name"><b>requestedUrl</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qwebframe.html#url-prop">url</a>() and <a href="qwebframe.html#url-prop">setUrl</a>().</p>
<!-- @@@requestedUrl -->
<!-- $$$scrollPosition-prop$$$scrollPosition$$$setScrollPositionconstQPoint& -->
<h3 class="fn" id="scrollPosition-prop"><a name="scrollPosition-prop"></a><span class="name">scrollPosition</span> : <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span></h3>
<p>This property holds the position the frame is currently scrolled to.</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QPoint </td><td class="memItemRight bottomAlign"><span class="name"><b>scrollPosition</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setScrollPosition</b></span>(const QPoint &<i>pos</i>)</td></tr>
</table></div>
<!-- @@@scrollPosition -->
<!-- $$$title-prop$$$title -->
<h3 class="fn" id="title-prop"><a name="title-prop"></a><span class="name">title</span> : const <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the title of the frame as defined by the HTML &lt;title&gt; element</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>title</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qwebframe.html#titleChanged">titleChanged</a>().</p>
<!-- @@@title -->
<!-- $$$url-prop$$$url$$$setUrlconstQUrl& -->
<h3 class="fn" id="url-prop"><a name="url-prop"></a><span class="name">url</span> : <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span></h3>
<p>This property holds the url of the frame currently viewed</p>
<p>Setting this property clears the view and loads the URL.</p>
<p>By default, this property contains an empty, invalid URL.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QUrl </td><td class="memItemRight bottomAlign"><span class="name"><b>url</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUrl</b></span>(const QUrl &<i>url</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwebframe.html#urlChanged">urlChanged</a>().</p>
<!-- @@@url -->
<!-- $$$zoomFactor-prop$$$zoomFactor$$$setZoomFactorqreal -->
<h3 class="fn" id="zoomFactor-prop"><a name="zoomFactor-prop"></a><span class="name">zoomFactor</span> : <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span></h3>
<p>This property holds the zoom factor for the frame</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>zoomFactor</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setZoomFactor</b></span>(qreal <i>factor</i>)</td></tr>
</table></div>
<!-- @@@zoomFactor -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$addToJavaScriptWindowObject[overload1]$$$addToJavaScriptWindowObjectconstQString&QObject*ValueOwnership -->
<h3 class="fn" id="addToJavaScriptWindowObject"><a name="addToJavaScriptWindowObject"></a><span class="type">void</span> QWebFrame::<span class="name">addToJavaScriptWindowObject</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>name</i>, <span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>object</i>, <span class="type"><a href="qwebframe.html#ValueOwnership-enum">ValueOwnership</a></span> <i>own</i> = QtOwnership)</h3>
<p>Make <i>object</i> available under <i>name</i> from within the frame's JavaScript context. The <i>object</i> will be inserted as a child of the frame's window object.</p>
<p>Qt properties will be exposed as JavaScript properties and slots as JavaScript methods. The interaction between C++ and JavaScript is explained in the documentation of the <a href="qtwebkit-bridge.html">Qt WebKit bridge</a>.</p>
<p>If you want to ensure that your <a href="qtwebkit-bridge.html#qobjects">QObjects</a> remain accessible after loading a new URL, you should add them in a slot connected to the <a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a>() signal.</p>
<p>If Javascript is not enabled for this page, then this method does nothing.</p>
<p>The ownership of <i>object</i> is specified using <i>own</i>.</p>
<!-- @@@addToJavaScriptWindowObject -->
<!-- $$$childFrames[overload1]$$$childFrames -->
<h3 class="fn" id="childFrames"><a name="childFrames"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span><<span class="type">QWebFrame</span> *> QWebFrame::<span class="name">childFrames</span>() const</h3>
<p>Returns a list of all frames that are direct children of this frame.</p>
<p><b>See also </b><a href="qwebframe.html#parentFrame">parentFrame</a>().</p>
<!-- @@@childFrames -->
<!-- $$$contentsSizeChanged[overload1]$$$contentsSizeChangedconstQSize& -->
<h3 class="fn" id="contentsSizeChanged"><a name="contentsSizeChanged"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">contentsSizeChanged</span>(const <span class="type"><a href="../qtcore/qsize.html">QSize</a></span> &<i>size</i>)</h3>
<p>This signal is emitted when the frame's contents size changes to <i>size</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebframe.html#contentsSize-prop">contentsSize</a>().</p>
<!-- @@@contentsSizeChanged -->
<!-- $$$documentElement[overload1]$$$documentElement -->
<h3 class="fn" id="documentElement"><a name="documentElement"></a><span class="type"><a href="qwebelement.html">QWebElement</a></span> QWebFrame::<span class="name">documentElement</span>() const</h3>
<p>Returns the document element of this frame.</p>
<p>The document element provides access to the entire structured content of the frame.</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@documentElement -->
<!-- $$$evaluateJavaScript[overload1]$$$evaluateJavaScriptconstQString& -->
<h3 class="fn" id="evaluateJavaScript"><a name="evaluateJavaScript"></a><code>[slot] </code><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QWebFrame::<span class="name">evaluateJavaScript</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>scriptSource</i>)</h3>
<p>Evaluates the JavaScript defined by <i>scriptSource</i> using this frame as context and returns the result of the last executed statement.</p>
<p><b>Note: </b>This method may be very inefficient if <i>scriptSource</i> returns a DOM element as a result. For example, evaluation of the next innocuously looking code may take a lot of CPU and memory to execute:</p><pre class="cpp">
var img <span class="operator">=</span> document<span class="operator">.</span>createElement(<span class="char">'img'</span>);
document<span class="operator">.</span>getElementById(\<span class="string">"foo\").appendChild(img);
</span>
</pre>
<p>This code returns appended DOM element, which is converted to <a href="../qtcore/qvariant.html#QVariantMap-typedef">QVariantMap</a> containing all its properties. To avoid this issue you can add "true" after the last statement.</p>
<p><b>See also </b><a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a>(), <a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a>(), and <a href="qwebelement.html#evaluateJavaScript">QWebElement::evaluateJavaScript</a>().</p>
<!-- @@@evaluateJavaScript -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[virtual] </code><span class="type">bool</span> QWebFrame::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="../qtcore/qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$findAllElements[overload1]$$$findAllElementsconstQString& -->
<h3 class="fn" id="findAllElements"><a name="findAllElements"></a><span class="type"><a href="qwebelementcollection.html">QWebElementCollection</a></span> QWebFrame::<span class="name">findAllElements</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>selectorQuery</i>) const</h3>
<p>Returns a new list of elements matching the given CSS selector <i>selectorQuery</i>. If there are no matching elements, an empty list is returned.</p>
<p><a href="http://www.w3.org/TR/selectors/">Standard CSS selector</a> syntax is used for the query.</p>
<p>This method is equivalent to Document::querySelectorAll in the <a href="http://www.w3.org/TR/selectors-api/">DOM Selectors API</a>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebelement.html#findAll">QWebElement::findAll</a>().</p>
<!-- @@@findAllElements -->
<!-- $$$findFirstElement[overload1]$$$findFirstElementconstQString& -->
<h3 class="fn" id="findFirstElement"><a name="findFirstElement"></a><span class="type"><a href="qwebelement.html">QWebElement</a></span> QWebFrame::<span class="name">findFirstElement</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>selectorQuery</i>) const</h3>
<p>Returns the first element in the frame's document that matches the given CSS selector <i>selectorQuery</i>. If there is no matching element, a null element is returned.</p>
<p><a href="http://www.w3.org/TR/selectors/">Standard CSS selector</a> syntax is used for the query.</p>
<p>This method is equivalent to Document::querySelector in the <a href="http://www.w3.org/TR/selectors-api/">DOM Selectors API</a>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebelement.html#findFirst">QWebElement::findFirst</a>().</p>
<!-- @@@findFirstElement -->
<!-- $$$frameName[overload1]$$$frameName -->
<h3 class="fn" id="frameName"><a name="frameName"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QWebFrame::<span class="name">frameName</span>() const</h3>
<p>The name of this frame as defined by the parent frame.</p>
<!-- @@@frameName -->
<!-- $$$geometry[overload1]$$$geometry -->
<h3 class="fn" id="geometry"><a name="geometry"></a><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QWebFrame::<span class="name">geometry</span>() const</h3>
<p>Return the geometry of the frame relative to it's parent frame.</p>
<!-- @@@geometry -->
<!-- $$$hitTestContent[overload1]$$$hitTestContentconstQPoint& -->
<h3 class="fn" id="hitTestContent"><a name="hitTestContent"></a><span class="type"><a href="qwebhittestresult.html">QWebHitTestResult</a></span> QWebFrame::<span class="name">hitTestContent</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &<i>pos</i>) const</h3>
<p>Performs a hit test on the frame contents at the given position <i>pos</i> and returns the hit test result.</p>
<!-- @@@hitTestContent -->
<!-- $$$iconChanged[overload1]$$$iconChanged -->
<h3 class="fn" id="iconChanged"><a name="iconChanged"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">iconChanged</span>()</h3>
<p>This signal is emitted when the icon ("favicon") associated with the frame has been loaded.</p>
<p><b>See also </b><a href="qwebframe.html#icon-prop">icon</a>().</p>
<!-- @@@iconChanged -->
<!-- $$$initialLayoutCompleted[overload1]$$$initialLayoutCompleted -->
<h3 class="fn" id="initialLayoutCompleted"><a name="initialLayoutCompleted"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">initialLayoutCompleted</span>()</h3>
<p>This signal is emitted when the frame is laid out the first time. This is the first time you will see contents displayed on the frame.</p>
<p><b>Note: </b>A frame can be laid out multiple times.</p><!-- @@@initialLayoutCompleted -->
<!-- $$$javaScriptWindowObjectCleared[overload1]$$$javaScriptWindowObjectCleared -->
<h3 class="fn" id="javaScriptWindowObjectCleared"><a name="javaScriptWindowObjectCleared"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">javaScriptWindowObjectCleared</span>()</h3>
<p>This signal is emitted whenever the global window object of the JavaScript environment is cleared, e.g., before starting a new load.</p>
<p>If you intend to add <a href="qtwebkit-bridge.html#qobjects">QObjects</a> to a <a href="qwebframe.html">QWebFrame</a> using <a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a>(), you should add them in a slot connected to this signal. This ensures that your objects remain accessible when loading new URLs.</p>
<!-- @@@javaScriptWindowObjectCleared -->
<!-- $$$load[overload1]$$$loadconstQUrl& -->
<h3 class="fn" id="load"><a name="load"></a><span class="type">void</span> QWebFrame::<span class="name">load</span>(const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> &<i>url</i>)</h3>
<p>Loads <i>url</i> into this frame.</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="qwebframe.html#url-prop">setUrl</a>(), <a href="qwebframe.html#setHtml">setHtml</a>(), and <a href="qwebframe.html#setContent">setContent</a>().</p>
<!-- @@@load -->
<!-- $$$load$$$loadconstQNetworkRequest&QNetworkAccessManager::OperationconstQByteArray& -->
<h3 class="fn" id="load-1"><a name="load-1"></a><span class="type">void</span> QWebFrame::<span class="name">load</span>(const <span class="type">QNetworkRequest</span> &<i>req</i>, <span class="type">QNetworkAccessManager::Operation</span> <i>operation</i> = QNetworkAccessManager::GetOperation, const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &<i>body</i> = QByteArray())</h3>
<p>Loads a network request, <i>req</i>, into this frame, 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 content.</p><p><b>See also </b><a href="qwebframe.html#url-prop">setUrl</a>().</p>
<!-- @@@load -->
<!-- $$$loadFinished[overload1]$$$loadFinishedbool -->
<h3 class="fn" id="loadFinished"><a name="loadFinished"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">loadFinished</span>(<span class="type">bool</span> <i>ok</i>)</h3>
<p>This signal is emitted when a load of this frame is finished. <i>ok</i> will indicate whether the load was successful or any error occurred.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebframe.html#loadStarted">loadStarted</a>().</p>
<!-- @@@loadFinished -->
<!-- $$$loadStarted[overload1]$$$loadStarted -->
<h3 class="fn" id="loadStarted"><a name="loadStarted"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">loadStarted</span>()</h3>
<p>This signal is emitted when a new load of this frame is started.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebframe.html#loadFinished">loadFinished</a>().</p>
<!-- @@@loadStarted -->
<!-- $$$metaData[overload1]$$$metaData -->
<h3 class="fn" id="metaData"><a name="metaData"></a><span class="type"><a href="../qtcore/qmultimap.html">QMultiMap</a></span><<span class="type"><a href="../qtcore/qstring.html">QString</a></span>, <span class="type"><a href="../qtcore/qstring.html">QString</a></span>> QWebFrame::<span class="name">metaData</span>() const</h3>
<p>Returns the meta data in this frame as a <a href="../qtcore/qmultimap.html">QMultiMap</a></p>
<p>The meta data consists of the name and content attributes of the of the <code><meta></code> tags in the HTML document.</p>
<p>For example:</p>
<pre class="cpp">
<span class="operator"><</span>html<span class="operator">></span>
<span class="operator"><</span>head<span class="operator">></span>
<span class="operator"><</span>meta name<span class="operator">=</span><span class="string">"description"</span> content<span class="operator">=</span><span class="string">"This document is a tutorial about Qt development"</span><span class="operator">></span>
<span class="operator"><</span>meta name<span class="operator">=</span><span class="string">"keywords"</span> content<span class="operator">=</span><span class="string">"Qt, WebKit, Programming"</span><span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>head<span class="operator">></span>
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="operator"><</span><span class="operator">/</span>html<span class="operator">></span>
</pre>
<p>Given the above HTML code the metaData() function will return a map with two entries:</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Key</th><th >Value</th></tr></thead>
<tr valign="top" class="odd"><td >"description"</td><td >"This document is a tutorial about Qt development"</td></tr>
<tr valign="top" class="even"><td >"keywords"</td><td >"Qt, WebKit, Programming"</td></tr>
</table></div>
<p>This function returns a multi map to support multiple meta tags with the same attribute name.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@metaData -->
<!-- $$$ownerElement[overload1]$$$ownerElement -->
<h3 class="fn" id="ownerElement"><a name="ownerElement"></a><span class="type"><a href="qwebelement.html">QWebElement</a></span> QWebFrame::<span class="name">ownerElement</span>() const</h3>
<!-- @@@ownerElement -->
<!-- $$$page[overload1]$$$page -->
<h3 class="fn" id="page"><a name="page"></a><span class="type"><a href="qwebpage.html">QWebPage</a></span> *QWebFrame::<span class="name">page</span>() const</h3>
<p>The web page that contains this frame.</p>
<p><b>See also </b><a href="qwebframe.html#pageChanged">pageChanged</a>().</p>
<!-- @@@page -->
<!-- $$$pageChanged[overload1]$$$pageChanged -->
<h3 class="fn" id="pageChanged"><a name="pageChanged"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">pageChanged</span>()</h3>
<p>This signal is emitted when this frame has been moved to a different <a href="qwebpage.html">QWebPage</a>.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qwebframe.html#page">page</a>().</p>
<!-- @@@pageChanged -->
<!-- $$$parentFrame[overload1]$$$parentFrame -->
<h3 class="fn" id="parentFrame"><a name="parentFrame"></a><span class="type">QWebFrame</span> *QWebFrame::<span class="name">parentFrame</span>() const</h3>
<p>Returns the parent frame of this frame, or 0 if the frame is the web pages main frame.</p>
<p>This is equivalent to <a href="../qtcore/qobject.html#qobject_cast">qobject_cast</a><<a href="qwebframe.html">QWebFrame</a>*>(frame-><a href="../qtcore/qobject.html#parent">parent</a>()).</p>
<p><b>See also </b><a href="qwebframe.html#childFrames">childFrames</a>().</p>
<!-- @@@parentFrame -->
<!-- $$$pos[overload1]$$$pos -->
<h3 class="fn" id="pos"><a name="pos"></a><span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> QWebFrame::<span class="name">pos</span>() const</h3>
<p>Returns the position of the frame relative to it's parent frame.</p>
<!-- @@@pos -->
<!-- $$$print[overload1]$$$printQPrinter* -->
<h3 class="fn" id="print"><a name="print"></a><code>[slot] </code><span class="type">void</span> QWebFrame::<span class="name">print</span>(<span class="type"><a href="../qtprintsupport/qprinter.html">QPrinter</a></span> *<i>printer</i>) const</h3>
<p>Prints the frame to the given <i>printer</i>.</p>
<p><b>See also </b><a href="qwebframe.html#render">render</a>().</p>
<!-- @@@print -->
<!-- $$$render[overload1]$$$renderQPainter*constQRegion& -->
<h3 class="fn" id="render"><a name="render"></a><span class="type">void</span> QWebFrame::<span class="name">render</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> &<i>clip</i> = QRegion())</h3>
<p>Render the frame into <i>painter</i> clipping to <i>clip</i>.</p>
<!-- @@@render -->
<!-- $$$render$$$renderQPainter*RenderLayersconstQRegion& -->
<h3 class="fn" id="render-1"><a name="render-1"></a><span class="type">void</span> QWebFrame::<span class="name">render</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, <span class="type"><a href="qwebframe.html#RenderLayer-enum">RenderLayers</a></span> <i>layer</i>, const <span class="type"><a href="../qtgui/qregion.html">QRegion</a></span> &<i>clip</i> = QRegion())</h3>
<p>Render the <i>layer</i> of the frame using <i>painter</i> clipping to <i>clip</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebframe.html#print">print</a>().</p>
<!-- @@@render -->
<!-- $$$scroll[overload1]$$$scrollintint -->
<h3 class="fn" id="scroll"><a name="scroll"></a><span class="type">void</span> QWebFrame::<span class="name">scroll</span>(<span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i>)</h3>
<p>Scrolls the frame <i>dx</i> pixels to the right and <i>dy</i> pixels downward. Both <i>dx</i> and <i>dy</i> may be negative.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qwebframe.html#scrollPosition-prop">QWebFrame::scrollPosition</a>.</p>
<!-- @@@scroll -->
<!-- $$$scrollBarGeometry[overload1]$$$scrollBarGeometryQt::Orientation -->
<h3 class="fn" id="scrollBarGeometry"><a name="scrollBarGeometry"></a><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QWebFrame::<span class="name">scrollBarGeometry</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>) const</h3>
<p>Returns the geometry for the scrollbar with orientation <i>orientation</i>.</p>
<p>If the scrollbar does not exist an empty rect is returned.</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@scrollBarGeometry -->
<!-- $$$scrollBarMaximum[overload1]$$$scrollBarMaximumQt::Orientation -->
<h3 class="fn" id="scrollBarMaximum"><a name="scrollBarMaximum"></a><span class="type">int</span> QWebFrame::<span class="name">scrollBarMaximum</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>) const</h3>
<p>Returns the maximum value for the scrollbar with orientation <i>orientation</i>, or 0 if no scrollbar is found for <i>orientation</i>.</p>
<p><b>See also </b><a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>().</p>
<!-- @@@scrollBarMaximum -->
<!-- $$$scrollBarMinimum[overload1]$$$scrollBarMinimumQt::Orientation -->
<h3 class="fn" id="scrollBarMinimum"><a name="scrollBarMinimum"></a><span class="type">int</span> QWebFrame::<span class="name">scrollBarMinimum</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>) const</h3>
<p>Returns the minimum value for the scrollbar with orientation <i>orientation</i>.</p>
<p>The minimum value is always 0.</p>
<p><b>See also </b><a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>
<!-- @@@scrollBarMinimum -->
<!-- $$$scrollBarPolicy[overload1]$$$scrollBarPolicyQt::Orientation -->
<h3 class="fn" id="scrollBarPolicy"><a name="scrollBarPolicy"></a><span class="type"><a href="../qtcore/qt.html#ScrollBarPolicy-enum">Qt::ScrollBarPolicy</a></span> QWebFrame::<span class="name">scrollBarPolicy</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>) const</h3>
<p>Returns the scrollbar policy for the scrollbar defined by <i>orientation</i>.</p>
<p><b>See also </b><a href="qwebframe.html#setScrollBarPolicy">setScrollBarPolicy</a>().</p>
<!-- @@@scrollBarPolicy -->
<!-- $$$scrollBarValue[overload1]$$$scrollBarValueQt::Orientation -->
<h3 class="fn" id="scrollBarValue"><a name="scrollBarValue"></a><span class="type">int</span> QWebFrame::<span class="name">scrollBarValue</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>) const</h3>
<p>Returns the current value for the scrollbar with orientation <i>orientation</i>, or 0 if no scrollbar is found for <i>orientation</i>.</p>
<p><b>See also </b><a href="qwebframe.html#setScrollBarValue">setScrollBarValue</a>(), <a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>(), and <a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>
<!-- @@@scrollBarValue -->
<!-- $$$scrollToAnchor[overload1]$$$scrollToAnchorconstQString& -->
<h3 class="fn" id="scrollToAnchor"><a name="scrollToAnchor"></a><span class="type">void</span> QWebFrame::<span class="name">scrollToAnchor</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>anchor</i>)</h3>
<p>Scrolls the frame to the given <i>anchor</i> name.</p>
<p>This function was introduced in Qt 4.7.</p>
<!-- @@@scrollToAnchor -->
<!-- $$$securityOrigin[overload1]$$$securityOrigin -->
<h3 class="fn" id="securityOrigin"><a name="securityOrigin"></a><span class="type"><a href="qwebsecurityorigin.html">QWebSecurityOrigin</a></span> QWebFrame::<span class="name">securityOrigin</span>() const</h3>
<p>Returns the frame's security origin.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@securityOrigin -->
<!-- $$$setContent[overload1]$$$setContentconstQByteArray&constQString&constQUrl& -->
<h3 class="fn" id="setContent"><a name="setContent"></a><span class="type">void</span> QWebFrame::<span class="name">setContent</span>(const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &<i>data</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>mimeType</i> = QString(), const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> &<i>baseUrl</i> = QUrl())</h3>
<p>Sets the content of this frame 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>Note: </b>This method will not affect session or global history for the frame.</p><p><b>See also </b><a href="qwebframe.html#toHtml">toHtml</a>() and <a href="qwebframe.html#setHtml">setHtml</a>().</p>
<!-- @@@setContent -->
<!-- $$$setFocus[overload1]$$$setFocus -->
<h3 class="fn" id="setFocus"><a name="setFocus"></a><span class="type">void</span> QWebFrame::<span class="name">setFocus</span>()</h3>
<p>Gives keyboard input focus to this frame.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebframe.html#focus-prop">hasFocus</a>().</p>
<!-- @@@setFocus -->
<!-- $$$setHtml[overload1]$$$setHtmlconstQString&constQUrl& -->
<h3 class="fn" id="setHtml"><a name="setHtml"></a><span class="type">void</span> QWebFrame::<span class="name">setHtml</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>html</i>, const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> &<i>baseUrl</i> = QUrl())</h3>
<p>Sets the content of this frame to <i>html</i>. <i>baseUrl</i> is optional and used to resolve relative URLs in the document, such as referenced images or stylesheets.</p>
<p>The <i>html</i> is loaded immediately; external objects are loaded asynchronously.</p>
<p>If a script in the <i>html</i> runs longer than the default script timeout (currently 10 seconds), for example due to being blocked by a modal JavaScript alert dialog, this method will return as soon as possible after the timeout and any subsequent <i>html</i> will be 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. It is also possible for the encoding to be specified by web server.</p>
<p>This is a convenience function equivalent to <a href="qwebframe.html#setContent">setContent</a>(html, "text/html", <a href="qwebframe.html#baseUrl-prop">baseUrl</a>).</p>
<p><b>Note: </b>This method will not affect session or global history for the frame.</p><p><b>Warning:</b> This function works only for HTML, for other mime types (i.e. XHTML, SVG) <a href="qwebframe.html#setContent">setContent</a>() should be used instead.</p>
<p><b>See also </b><a href="qwebframe.html#toHtml">toHtml</a>(), <a href="qwebframe.html#setContent">setContent</a>(), and <a href="qwebframe.html#load">load</a>().</p>
<!-- @@@setHtml -->
<!-- $$$setScrollBarPolicy[overload1]$$$setScrollBarPolicyQt::OrientationQt::ScrollBarPolicy -->
<h3 class="fn" id="setScrollBarPolicy"><a name="setScrollBarPolicy"></a><span class="type">void</span> QWebFrame::<span class="name">setScrollBarPolicy</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="../qtcore/qt.html#ScrollBarPolicy-enum">Qt::ScrollBarPolicy</a></span> <i>policy</i>)</h3>
<p>Sets the scrollbar policy for the scrollbar defined by <i>orientation</i> to <i>policy</i>.</p>
<p><b>See also </b><a href="qwebframe.html#scrollBarPolicy">scrollBarPolicy</a>().</p>
<!-- @@@setScrollBarPolicy -->
<!-- $$$setScrollBarValue[overload1]$$$setScrollBarValueQt::Orientationint -->
<h3 class="fn" id="setScrollBarValue"><a name="setScrollBarValue"></a><span class="type">void</span> QWebFrame::<span class="name">setScrollBarValue</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type">int</span> <i>value</i>)</h3>
<p>Sets the current <i>value</i> for the scrollbar with orientation <i>orientation</i>.</p>
<p>The scrollbar forces the <i>value</i> to be within the legal range: minimum <= value <= maximum.</p>
<p>Changing the value also updates the thumb position.</p>
<p><b>See also </b><a href="qwebframe.html#scrollBarValue">scrollBarValue</a>(), <a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>(), and <a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>
<!-- @@@setScrollBarValue -->
<!-- $$$setTextSizeMultiplier[overload1]$$$setTextSizeMultiplierqreal -->
<h3 class="fn" id="setTextSizeMultiplier"><a name="setTextSizeMultiplier"></a><span class="type">void</span> QWebFrame::<span class="name">setTextSizeMultiplier</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i>)</h3>
<p>Sets the value of the multiplier used to scale the text in a Web frame to the <i>factor</i> specified.</p>
<p><b>See also </b><a href="qwebframe.html#textSizeMultiplier">textSizeMultiplier</a>().</p>
<!-- @@@setTextSizeMultiplier -->
<!-- $$$textSizeMultiplier[overload1]$$$textSizeMultiplier -->
<h3 class="fn" id="textSizeMultiplier"><a name="textSizeMultiplier"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QWebFrame::<span class="name">textSizeMultiplier</span>() const</h3>
<p>Returns the value of the multiplier used to scale the text in a Web frame.</p>
<p><b>See also </b><a href="qwebframe.html#setTextSizeMultiplier">setTextSizeMultiplier</a>().</p>
<!-- @@@textSizeMultiplier -->
<!-- $$$titleChanged[overload1]$$$titleChangedconstQString& -->
<h3 class="fn" id="titleChanged"><a name="titleChanged"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">titleChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>title</i>)</h3>
<p>This signal is emitted whenever the title of the frame changes. The <i>title</i> string specifies the new title.</p>
<p><b>See also </b><a href="qwebframe.html#title-prop">title</a>().</p>
<!-- @@@titleChanged -->
<!-- $$$toHtml[overload1]$$$toHtml -->
<h3 class="fn" id="toHtml"><a name="toHtml"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QWebFrame::<span class="name">toHtml</span>() const</h3>
<p>Returns the frame's content as HTML, enclosed in HTML and BODY tags.</p>
<p><b>See also </b><a href="qwebframe.html#setHtml">setHtml</a>() and <a href="qwebframe.html#toPlainText">toPlainText</a>().</p>
<!-- @@@toHtml -->
<!-- $$$toPlainText[overload1]$$$toPlainText -->
<h3 class="fn" id="toPlainText"><a name="toPlainText"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QWebFrame::<span class="name">toPlainText</span>() const</h3>
<p>Returns the content of this frame converted to plain text, completely stripped of all HTML formatting.</p>
<p><b>See also </b><a href="qwebframe.html#toHtml">toHtml</a>().</p>
<!-- @@@toPlainText -->
<!-- $$$urlChanged[overload1]$$$urlChangedconstQUrl& -->
<h3 class="fn" id="urlChanged"><a name="urlChanged"></a><code>[signal] </code><span class="type">void</span> QWebFrame::<span class="name">urlChanged</span>(const <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> &<i>url</i>)</h3>
<p>This signal is emitted with the URL of the frame when the frame's title is received. The new URL is specified by <i>url</i>.</p>
<p><b>See also </b><a href="qwebframe.html#url-prop">url</a>().</p>
<!-- @@@urlChanged -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|